#include <gmlib/sm9/internal/sm9_field.h>
#include <stdexcept>
#include <cstring>

using namespace sm9::internal;

void test_sm9_fp_sub()
{
    sm9_fp_t    a, b, c;
    std::uint8_t c_data[32];

    static std::uint8_t a0[32] = {0x95,0xab,0xb3,0xf6,0x59,0xea,0xe4,0x63,0xb1,0xcb,0xa8,0xc3,0x5c,0x23,0xac,0x86,0x8a,0x50,0x48,0x5b,0xe4,0x91,0x07,0xd0,0x98,0x86,0xf0,0xe7,0x40,0x98,0x5c,0x32};
    static std::uint8_t b0[32] = {0x08,0x86,0x0d,0x79,0x4c,0xd3,0x71,0xb8,0xba,0x39,0x6e,0x5f,0xf3,0x06,0x07,0x79,0xc7,0xaf,0x63,0xd8,0x14,0x20,0xfd,0x30,0xfd,0xbc,0xb3,0x88,0xd0,0x05,0xeb,0x7e};
    static std::uint8_t c0[32] = {0x8d,0x25,0xa6,0x7d,0x0d,0x17,0x72,0xaa,0xf7,0x92,0x3a,0x63,0x69,0x1d,0xa5,0x0c,0xc2,0xa0,0xe4,0x83,0xd0,0x70,0x0a,0x9f,0x9a,0xca,0x3d,0x5e,0x70,0x92,0x70,0xb4};
    sm9_fp_from_bytes(a, a0);
    sm9_fp_from_bytes(b, b0);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c0, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a1[32] = {0x0b,0x19,0xf3,0x9e,0x31,0x24,0xa3,0x90,0xe8,0x28,0x6f,0xfe,0x31,0x1a,0x8d,0xe1,0xbe,0x28,0xd6,0xbe,0x05,0x7a,0x4e,0x6a,0x85,0xce,0x7e,0x37,0x7e,0x5b,0x00,0x8f};
    static std::uint8_t b1[32] = {0x45,0x48,0xf9,0x22,0x92,0xb6,0x0d,0xe9,0xd8,0xbd,0x59,0x92,0xe5,0x3c,0x36,0x65,0x1b,0x6d,0xb7,0xfe,0xfd,0xe8,0x6d,0x6b,0x11,0x30,0xf7,0xf8,0x1c,0xb4,0x55,0xb2};
    static std::uint8_t c1[32] = {0x7c,0x10,0xfa,0x7b,0xa1,0x12,0x3c,0x98,0xe5,0x6e,0xc1,0xbb,0x41,0x6d,0x1e,0xc1,0xc4,0xad,0xb2,0x0a,0x22,0x0c,0xcf,0xdb,0x5a,0x0d,0x21,0x67,0x44,0xf7,0xf0,0x5a};
    sm9_fp_from_bytes(a, a1);
    sm9_fp_from_bytes(b, b1);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c1, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a2[32] = {0xa3,0x80,0xc6,0xa7,0xe3,0x6c,0x6b,0x21,0x20,0x38,0x83,0x8f,0x8d,0x9a,0xc7,0x02,0xb6,0x23,0x14,0x41,0xd6,0x20,0x32,0x34,0xc9,0x58,0x0b,0xe7,0x95,0x90,0xc6,0x41};
    static std::uint8_t b2[32] = {0x7b,0xfd,0x11,0x80,0xea,0x26,0x5b,0x56,0xa0,0x4e,0xbe,0xf5,0x41,0x9d,0x64,0xe2,0x3d,0x0d,0x4e,0xbc,0x1b,0x83,0xad,0xaa,0x89,0x06,0x7c,0xac,0x63,0x6e,0x4a,0xf7};
    static std::uint8_t c2[32] = {0x27,0x83,0xb5,0x26,0xf9,0x46,0x0f,0xca,0x7f,0xe9,0xc4,0x9a,0x4b,0xfd,0x62,0x20,0x79,0x15,0xc5,0x85,0xba,0x9c,0x84,0x8a,0x40,0x51,0x8f,0x3b,0x32,0x22,0x7b,0x4a};
    sm9_fp_from_bytes(a, a2);
    sm9_fp_from_bytes(b, b2);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c2, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a3[32] = {0x08,0x6f,0x3f,0xfb,0xb7,0xe5,0x60,0xb6,0x3a,0x5a,0xb3,0x09,0xf6,0x17,0xb6,0x0e,0x7b,0xef,0xab,0x1e,0x0d,0x62,0xbd,0x39,0xee,0xf4,0xca,0x4c,0x0b,0x49,0xe6,0x15};
    static std::uint8_t b3[32] = {0x47,0x50,0xfd,0x2a,0x43,0x33,0x1d,0xfa,0x22,0x26,0x7f,0xf4,0x69,0xba,0x76,0x29,0x2c,0x1f,0x93,0x9a,0xc5,0x6b,0x73,0xa4,0x87,0x75,0x3d,0xd1,0x9d,0x1a,0x0d,0xd2};
    static std::uint8_t c3[32] = {0x77,0x5e,0x42,0xd1,0x77,0x55,0xe9,0xad,0xee,0x37,0xde,0x65,0x81,0xec,0x07,0x2a,0x71,0xc2,0xaa,0xce,0x62,0x72,0x38,0x71,0x4c,0xef,0x27,0xa2,0x51,0x81,0x1d,0xc0};
    sm9_fp_from_bytes(a, a3);
    sm9_fp_from_bytes(b, b3);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c3, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a4[32] = {0xae,0x88,0xd6,0x1b,0x9a,0x4d,0x16,0x88,0xc8,0xb5,0xbf,0x84,0xce,0xd5,0x4c,0xb9,0x93,0x55,0x51,0xc0,0x85,0x7e,0x23,0x50,0xf2,0x62,0xd3,0xfb,0xef,0x11,0x53,0x2d};
    static std::uint8_t b4[32] = {0x7e,0x19,0xb8,0x17,0x97,0xcd,0xf8,0xb9,0xb1,0x7a,0x49,0x1b,0x58,0xd4,0x4c,0x87,0xee,0x66,0x51,0x4e,0x7e,0x31,0x96,0xbf,0xaf,0xd1,0xbc,0x95,0x71,0x5c,0xf9,0x6c};
    static std::uint8_t c4[32] = {0x30,0x6f,0x1e,0x04,0x02,0x7f,0x1d,0xcf,0x17,0x3b,0x76,0x69,0x76,0x01,0x00,0x31,0xa4,0xef,0x00,0x72,0x07,0x4c,0x8c,0x91,0x42,0x91,0x17,0x66,0x7d,0xb4,0x59,0xc1};
    sm9_fp_from_bytes(a, a4);
    sm9_fp_from_bytes(b, b4);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c4, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a5[32] = {0x2b,0x7c,0xd4,0xd9,0xac,0x12,0xf1,0x21,0x11,0xee,0x0d,0x8a,0x41,0x2e,0x5f,0xa3,0xc9,0x63,0xb3,0x71,0x5d,0x09,0xee,0x64,0xce,0x03,0x64,0x60,0x0d,0x57,0xc4,0x2e};
    static std::uint8_t b5[32] = {0xa9,0x0d,0x36,0x7e,0x45,0x81,0xb5,0x38,0xd9,0x7e,0xb0,0xe6,0xa0,0x2d,0xd5,0x3a,0xdd,0x9a,0x70,0x38,0xf5,0xa0,0xf9,0xc6,0xac,0x48,0xe5,0x86,0xd4,0x97,0x21,0xcb};
    static std::uint8_t c5[32] = {0x38,0xaf,0x9e,0x5b,0x69,0x34,0xe2,0xda,0x0e,0x73,0x07,0xf3,0x96,0x8f,0x51,0xae,0x0d,0xbb,0xd6,0x83,0x81,0xe3,0xe3,0x7a,0x07,0x2a,0x1a,0x01,0x1c,0x11,0xe7,0xe0};
    sm9_fp_from_bytes(a, a5);
    sm9_fp_from_bytes(b, b5);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c5, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a6[32] = {0x12,0x0b,0x2e,0xc2,0xff,0xd4,0x9b,0xad,0xd8,0x58,0x5e,0x5b,0x20,0x9d,0xcf,0x37,0x09,0xa1,0x26,0x91,0x55,0xb4,0xc1,0xe4,0x0c,0xac,0x72,0xda,0x8e,0x48,0x99,0xdf};
    static std::uint8_t b6[32] = {0x13,0x75,0x84,0xa4,0x47,0x1f,0xe6,0x28,0xe8,0xd0,0xef,0x2f,0x38,0x3a,0x4b,0x4e,0x33,0x40,0x9d,0xf1,0xb6,0x1f,0xbb,0x8c,0xad,0x93,0x18,0xf7,0x84,0x96,0xa4,0xe9};
    static std::uint8_t c6[32] = {0xb4,0xd5,0xaa,0x1e,0xbb,0x58,0x5c,0x76,0xc5,0x8b,0x1a,0x7b,0xdd,0xf2,0x4b,0x2d,0xf8,0x53,0x1b,0xea,0xba,0x0f,0xf5,0x33,0x44,0x88,0xf5,0x0a,0xed,0x03,0x3a,0x73};
    sm9_fp_from_bytes(a, a6);
    sm9_fp_from_bytes(b, b6);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c6, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a7[32] = {0x29,0x95,0x21,0x2f,0x95,0xe6,0xf4,0x56,0x42,0x45,0x2e,0xc0,0x87,0x3a,0xd9,0x3d,0xa2,0xa4,0xd1,0xa9,0x2d,0x9d,0x35,0x53,0x84,0xb5,0x95,0x42,0xfd,0xc6,0x86,0xa3};
    static std::uint8_t b7[32] = {0x7f,0xed,0xb0,0x5c,0xf4,0x71,0xe3,0x0a,0xc9,0xf3,0x82,0xab,0xc8,0x9d,0x0b,0x5d,0x4e,0x79,0x15,0x45,0xec,0x79,0x8f,0xb3,0x74,0x13,0x73,0x22,0xc7,0xa6,0x9e,0xb8};
    static std::uint8_t c7[32] = {0x5f,0xe7,0x70,0xd2,0xa4,0x18,0xb8,0x3d,0x4e,0x55,0x57,0x64,0xb4,0x2c,0x95,0x25,0x76,0x1e,0x4f,0xae,0x5b,0x9e,0x94,0x7b,0xf6,0x11,0xbd,0x48,0x19,0x71,0x2d,0x68};
    sm9_fp_from_bytes(a, a7);
    sm9_fp_from_bytes(b, b7);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c7, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a8[32] = {0xad,0xff,0x33,0xcc,0x7d,0x66,0x01,0x36,0xe8,0xd3,0x9c,0xac,0xa8,0x97,0x58,0x67,0xc6,0x9b,0xf2,0x58,0x87,0x8f,0x16,0x19,0xcb,0xc5,0x00,0xf4,0xe8,0x4e,0xde,0x86};
    static std::uint8_t b8[32] = {0x30,0xfc,0xd4,0xfd,0xd7,0xc7,0xb3,0x6c,0x07,0x06,0x5c,0xbd,0x26,0xdd,0x3a,0xf9,0x37,0xef,0xb0,0xb2,0xed,0xe6,0x27,0xad,0xba,0xc0,0x0a,0x31,0xcf,0xf6,0x78,0x4f};
    static std::uint8_t c8[32] = {0x7d,0x02,0x5e,0xce,0xa5,0x9e,0x4d,0xca,0xe1,0xcd,0x3f,0xef,0x81,0xba,0x1d,0x6e,0x8e,0xac,0x41,0xa5,0x99,0xa8,0xee,0x6c,0x11,0x04,0xf6,0xc3,0x18,0x58,0x66,0x37};
    sm9_fp_from_bytes(a, a8);
    sm9_fp_from_bytes(b, b8);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c8, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a9[32] = {0x1d,0x33,0xb7,0xe5,0xcc,0x1d,0xf0,0x94,0x35,0x5f,0xdf,0xf6,0x32,0x85,0x2d,0x24,0x61,0xbf,0x31,0x51,0xf1,0xb2,0x5c,0x73,0x63,0x01,0x7c,0x1c,0x8c,0x17,0x36,0xfb};
    static std::uint8_t b9[32] = {0x21,0x25,0x57,0x31,0xaa,0x61,0x3d,0x82,0x34,0x50,0x37,0x3f,0x6c,0xdd,0x0d,0x8b,0x99,0x1b,0x67,0xc5,0x5b,0x99,0xf6,0x34,0x40,0xf6,0x95,0x7d,0x9e,0xb5,0xb2,0xd7};
    static std::uint8_t c9[32] = {0xb2,0x4e,0x60,0xb4,0x24,0x60,0x5a,0x03,0xd7,0x13,0x54,0x06,0xbb,0x36,0xe6,0xdd,0xea,0x96,0x5c,0xd7,0xb0,0x93,0x55,0x1b,0x07,0x7a,0x81,0xc6,0xd0,0xb2,0xc9,0xa1};
    sm9_fp_from_bytes(a, a9);
    sm9_fp_from_bytes(b, b9);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c9, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a10[32] = {0x27,0xc5,0xb9,0x2b,0x99,0x4f,0x62,0x96,0x3a,0x6c,0x14,0x64,0x82,0xd1,0x8a,0x21,0xf0,0x06,0x61,0x23,0xf2,0xf3,0x18,0xb4,0x5b,0x39,0x97,0xe6,0x01,0x5e,0xa6,0x9c};
    static std::uint8_t b10[32] = {0x3b,0xe0,0xf4,0x36,0xbc,0x1c,0x3c,0x1c,0xa6,0x9a,0x68,0xd8,0x11,0x6e,0x96,0xc5,0xeb,0x8a,0x8f,0x65,0x3e,0x14,0x79,0x02,0xaa,0xea,0xf3,0xd2,0x2c,0x36,0xb1,0xaa};
    static std::uint8_t c10[32] = {0xa2,0x24,0xc4,0xf4,0xdf,0xd6,0xcd,0x6b,0x69,0xd5,0x56,0xdc,0x66,0xf1,0xba,0xa1,0x26,0x6e,0x65,0x09,0xcf,0x59,0x8e,0x8d,0x95,0xbe,0x3f,0x3b,0xb8,0x79,0x3a,0x6f};
    sm9_fp_from_bytes(a, a10);
    sm9_fp_from_bytes(b, b10);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c10, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a11[32] = {0x81,0x91,0x2e,0x26,0x09,0xf5,0x9e,0x16,0x80,0x41,0xae,0x14,0xf9,0xc3,0x95,0xf1,0x72,0xe7,0x65,0xaa,0x05,0x18,0x82,0x89,0x94,0x27,0x76,0x40,0x18,0x0b,0x61,0xfc};
    static std::uint8_t b11[32] = {0x33,0xa5,0x78,0x11,0xeb,0x08,0x2d,0xa9,0x84,0x18,0x25,0x69,0x18,0xbe,0xbe,0xd3,0xf3,0x88,0x44,0xfd,0xc7,0xab,0xee,0xc4,0x33,0xfe,0x0e,0x46,0xd1,0xb0,0xec,0x8c};
    static std::uint8_t c11[32] = {0x4d,0xeb,0xb6,0x14,0x1e,0xed,0x70,0x6c,0xfc,0x29,0x88,0xab,0xe1,0x04,0xd7,0x1d,0x7f,0x5f,0x20,0xac,0x3d,0x6c,0x93,0xc5,0x60,0x29,0x67,0xf9,0x46,0x5a,0x75,0x70};
    sm9_fp_from_bytes(a, a11);
    sm9_fp_from_bytes(b, b11);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c11, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a12[32] = {0x93,0x86,0x73,0xf2,0x86,0x24,0x7b,0x70,0xef,0xd5,0x74,0x56,0x49,0xf1,0x7c,0x13,0xe3,0xa8,0x5a,0x68,0xfb,0x38,0xdf,0xb8,0xab,0x17,0x24,0xa4,0x37,0x5f,0xb7,0xe8};
    static std::uint8_t b12[32] = {0xa9,0xcb,0x12,0x67,0x32,0x1a,0x48,0x90,0x53,0x6d,0x8e,0x80,0x31,0xe0,0xfe,0x27,0xa1,0xd0,0x61,0xed,0x04,0xed,0x1a,0xae,0xd4,0x96,0x5a,0x8e,0x57,0xd9,0x4c,0x48};
    static std::uint8_t c12[32] = {0x9f,0xfb,0x61,0x8b,0x56,0xad,0xd9,0xd2,0x72,0x6b,0x91,0x26,0x0d,0x9f,0x45,0x31,0x63,0xca,0x8b,0xc7,0x10,0xc6,0xb3,0xe5,0xbb,0xf0,0x65,0x3d,0xc2,0xd7,0xb1,0x1d};
    sm9_fp_from_bytes(a, a12);
    sm9_fp_from_bytes(b, b12);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c12, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a13[32] = {0xaf,0x7e,0x97,0x8d,0xf6,0x9b,0xda,0x70,0x2c,0x57,0xab,0x73,0x8f,0x51,0xca,0xcf,0x80,0x16,0x0c,0x93,0xec,0xca,0xae,0x95,0xc7,0xfa,0xf9,0xa4,0x3e,0xb6,0x06,0x12};
    static std::uint8_t b13[32] = {0x3c,0xdd,0xed,0x62,0xfe,0x06,0x9e,0x0d,0xe1,0x8d,0x87,0x1d,0x3a,0xa9,0x8a,0xef,0x85,0x11,0x6e,0x5d,0xb0,0x72,0xd3,0x3b,0x67,0x78,0x98,0xfd,0x53,0x64,0x22,0xb2};
    static std::uint8_t c13[32] = {0x72,0xa0,0xaa,0x2a,0xf8,0x95,0x3c,0x62,0x4a,0xca,0x24,0x56,0x54,0xa8,0x3f,0xdf,0xfb,0x04,0x9e,0x36,0x3c,0x57,0xdb,0x5a,0x60,0x82,0x60,0xa6,0xeb,0x51,0xe3,0x60};
    sm9_fp_from_bytes(a, a13);
    sm9_fp_from_bytes(b, b13);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c13, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a14[32] = {0x28,0x52,0xec,0xbd,0xcb,0x41,0x61,0x8e,0x6b,0x26,0xe9,0xdd,0xb7,0x8f,0x9b,0x90,0x50,0x33,0x28,0xd9,0xac,0x06,0x10,0x4e,0x43,0x99,0x04,0x4b,0x38,0xea,0xba,0xec};
    static std::uint8_t b14[32] = {0x6c,0x44,0x9c,0x17,0xed,0xec,0xf3,0xbe,0xcf,0xbf,0x50,0x74,0x62,0xff,0x3d,0x46,0x03,0x56,0x62,0x94,0x87,0x96,0x17,0x30,0x3b,0xfe,0xfa,0xea,0x26,0xaa,0x6a,0x57};
    static std::uint8_t c14[32] = {0x72,0x4e,0x50,0xa5,0xdf,0xf8,0x14,0xc1,0x71,0x6b,0x44,0xb9,0x4a,0x1f,0x25,0x8f,0x6e,0xcf,0x59,0x90,0x3e,0xea,0xe7,0xf9,0xed,0x09,0xa4,0x88,0xf5,0x91,0x96,0x12};
    sm9_fp_from_bytes(a, a14);
    sm9_fp_from_bytes(b, b14);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c14, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a15[32] = {0x29,0x16,0xa6,0x94,0x32,0x1f,0xa6,0xa5,0xa3,0xf7,0x7d,0x13,0x86,0xd0,0x69,0x07,0x89,0x56,0x5c,0x82,0xe7,0xce,0x18,0xeb,0x95,0x95,0x61,0xf2,0x35,0xa0,0x22,0x7d};
    static std::uint8_t b15[32] = {0xb1,0x32,0x65,0x99,0x73,0xb1,0xaf,0x69,0x60,0x58,0x3f,0xfe,0xcc,0x0d,0x65,0x00,0xf2,0x85,0x79,0xac,0x56,0x25,0xa1,0xff,0xc5,0x11,0x94,0x95,0xcb,0xea,0xb7,0x67};
    static std::uint8_t c15[32] = {0x2e,0x24,0x40,0xfa,0xc1,0x11,0x9e,0x2e,0x19,0xa2,0xe8,0x64,0xb0,0x51,0xcb,0x4b,0xb8,0xc3,0x76,0x21,0xac,0x23,0x65,0xc7,0xb5,0xf3,0x68,0x84,0x4d,0x06,0xb0,0x93};
    sm9_fp_from_bytes(a, a15);
    sm9_fp_from_bytes(b, b15);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c15, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a16[32] = {0xb0,0x09,0x7c,0xf1,0x88,0x97,0xad,0xef,0x5d,0x9a,0x5f,0x5a,0x40,0x76,0x46,0x6a,0x70,0x08,0x64,0xa8,0xd4,0xbb,0x14,0xc5,0xf2,0x6b,0x46,0xf2,0x2e,0x41,0xd3,0xca};
    static std::uint8_t b16[32] = {0x46,0x57,0xc1,0xff,0xfe,0xad,0x3b,0x30,0xa5,0xfe,0xf9,0x8a,0x55,0x9a,0x37,0x4a,0xcf,0x00,0x8f,0x27,0xd2,0xcd,0xa9,0x99,0x12,0x2c,0x7c,0x64,0x4b,0xe1,0xd8,0x27};
    static std::uint8_t c16[32] = {0x69,0xb1,0xba,0xf1,0x89,0xea,0x72,0xbe,0xb7,0x9b,0x65,0xcf,0xea,0xdc,0x0f,0x1f,0xa1,0x07,0xd5,0x81,0x01,0xed,0x6b,0x2c,0xe0,0x3e,0xca,0x8d,0xe2,0x5f,0xfb,0xa3};
    sm9_fp_from_bytes(a, a16);
    sm9_fp_from_bytes(b, b16);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c16, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a17[32] = {0x37,0x4f,0x39,0x61,0x38,0x3e,0xbe,0xff,0xe4,0x94,0x4e,0xfe,0x30,0xdf,0xdd,0xb6,0x9d,0xf3,0xa9,0xf9,0x4e,0x7e,0x10,0xbd,0xad,0xd6,0x9d,0x13,0xda,0xe7,0xf6,0x17};
    static std::uint8_t b17[32] = {0x49,0xa2,0x38,0x4e,0xc8,0x49,0xa5,0x29,0x43,0x1c,0xda,0xd2,0xe7,0xdc,0xcd,0xb0,0x21,0x5f,0x9c,0xb1,0x86,0x75,0x5f,0x40,0x46,0x35,0x57,0x92,0xac,0xba,0xbf,0x8c};
    static std::uint8_t c17[32] = {0xa3,0xed,0x01,0x12,0x72,0x98,0xc0,0xc8,0x77,0x7b,0x1f,0x7b,0x3e,0x91,0xd7,0x4b,0x9e,0x86,0xa0,0x92,0xe2,0x83,0xa0,0x59,0x4d,0x10,0xe0,0xa9,0x11,0x7e,0x7c,0x08};
    sm9_fp_from_bytes(a, a17);
    sm9_fp_from_bytes(b, b17);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c17, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a18[32] = {0xa7,0x8f,0x52,0x17,0xd9,0x42,0x39,0x27,0x1d,0x65,0xed,0x05,0x20,0x06,0xe9,0x93,0x17,0x07,0xd1,0x26,0x4e,0xe1,0xd5,0x0e,0x05,0x60,0xd1,0x6c,0x0f,0xa6,0xf0,0x65};
    static std::uint8_t b18[32] = {0x07,0x45,0xef,0x31,0xad,0x9b,0x5d,0xbd,0x0a,0x82,0xa1,0xd4,0xa3,0x50,0x80,0x49,0x68,0x9d,0x96,0xd8,0xe4,0xc0,0x3b,0x38,0xe7,0x2c,0x06,0x0a,0x69,0x5f,0x9b,0xa1};
    static std::uint8_t c18[32] = {0xa0,0x49,0x62,0xe6,0x2b,0xa6,0xdb,0x6a,0x12,0xe3,0x4b,0x30,0x7c,0xb6,0x69,0x49,0xae,0x6a,0x3a,0x4d,0x6a,0x21,0x99,0xd5,0x1e,0x34,0xcb,0x61,0xa6,0x47,0x54,0xc4};
    sm9_fp_from_bytes(a, a18);
    sm9_fp_from_bytes(b, b18);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c18, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a19[32] = {0x18,0x09,0xc0,0x18,0xb5,0x43,0xce,0xa9,0xf0,0x11,0x82,0x49,0x7f,0x29,0xb8,0xc1,0xe0,0xad,0x87,0xf7,0x1c,0xdd,0x32,0xc4,0x17,0x2c,0xdc,0xe0,0x9c,0x7b,0xdd,0x73};
    static std::uint8_t b19[32] = {0x7a,0xac,0xf5,0xe2,0x1c,0xca,0xfa,0xc0,0x25,0x64,0x22,0xdb,0xe2,0x1e,0xc7,0x5e,0xad,0x48,0x0a,0xc4,0xcb,0x00,0x21,0x3c,0x9a,0x07,0x24,0x8a,0xfb,0x6f,0xaf,0x60};
    static std::uint8_t c19[32] = {0x53,0x9c,0xca,0x36,0x9b,0x1c,0x7a,0xdb,0xa0,0xb1,0x0a,0xbd,0x92,0x99,0xb8,0xa8,0x55,0x58,0x10,0x7d,0x6c,0x58,0x00,0x63,0x62,0x95,0x53,0x7d,0x84,0x5d,0x73,0x90};
    sm9_fp_from_bytes(a, a19);
    sm9_fp_from_bytes(b, b19);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c19, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a20[32] = {0x09,0x73,0xcc,0xe5,0xc2,0x59,0xb6,0xa5,0xc9,0x86,0x3e,0x90,0xf3,0x0f,0xb2,0x27,0x0c,0xcf,0x81,0x0b,0xe3,0x21,0x6b,0x2a,0x18,0xe6,0xe8,0xc6,0xda,0xa0,0xa5,0xdf};
    static std::uint8_t b20[32] = {0x2e,0xd9,0xc1,0x70,0x1e,0x4c,0x8a,0x17,0xb9,0x64,0x97,0x31,0x37,0x03,0xda,0xb1,0xd7,0x33,0x07,0x19,0xf7,0xfc,0xb7,0xdc,0x93,0x23,0xec,0x07,0x74,0xb2,0xe1,0xf5};
    static std::uint8_t c20[32] = {0x90,0xda,0x0b,0x75,0xa6,0xb0,0xd3,0x7f,0xe6,0x25,0x52,0xaf,0xb1,0x9a,0x9e,0xba,0x57,0x8f,0x0d,0x3d,0x05,0x9f,0xa2,0x29,0x6b,0x32,0x97,0xe7,0x49,0x3f,0x09,0x67};
    sm9_fp_from_bytes(a, a20);
    sm9_fp_from_bytes(b, b20);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c20, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a21[32] = {0x16,0x3e,0xb6,0xdd,0xb4,0x83,0x63,0xeb,0xd4,0x7a,0x4e,0xb2,0xe3,0x2c,0xb5,0x89,0x32,0x7c,0xa8,0x12,0x28,0xd4,0xa4,0x53,0xa0,0xd1,0x2e,0x37,0x67,0xbb,0x94,0xdf};
    static std::uint8_t b21[32] = {0x5d,0xa3,0x7f,0xe5,0xeb,0xb1,0x52,0xa2,0xe5,0x79,0x2f,0xf5,0xed,0xe8,0x73,0x7e,0x5c,0x4b,0x05,0xdc,0xc3,0xce,0x5e,0x6f,0xa3,0x5a,0xdc,0x1a,0xa7,0x60,0x97,0xaf};
    static std::uint8_t c21[32] = {0x6e,0xdb,0x36,0xf7,0xcb,0x75,0xb8,0x3a,0xc5,0x04,0xca,0x0c,0xea,0xd3,0x09,0x4f,0xf8,0x24,0x35,0x80,0x7f,0x81,0x34,0xbf,0xe2,0xe5,0xed,0x44,0xa3,0xac,0x42,0xad};
    sm9_fp_from_bytes(a, a21);
    sm9_fp_from_bytes(b, b21);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c21, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a22[32] = {0x28,0xf2,0x36,0x9c,0x44,0x03,0xdf,0xa4,0x50,0x4f,0xbd,0x8a,0x9b,0x23,0xd2,0x2b,0x8e,0xa5,0x58,0xd8,0xd3,0x6a,0xe9,0x21,0x7e,0xff,0x05,0xff,0x95,0x5f,0x13,0x54};
    static std::uint8_t b22[32] = {0x47,0xe7,0x72,0x52,0xad,0xc0,0xb9,0xbc,0x42,0x0e,0x8d,0x1f,0x18,0xd0,0x94,0xcb,0xf9,0xdc,0x51,0x73,0x91,0xb5,0xd4,0x9e,0x9e,0xa3,0x1c,0xfe,0x8d,0x3f,0xcf,0x6f};
    static std::uint8_t c22[32] = {0x97,0x4a,0xc4,0x49,0x98,0xe6,0xcc,0xd9,0xe4,0x44,0xdb,0xbb,0x77,0xe2,0x04,0xa4,0xb6,0xbb,0x9a,0xb0,0x5c,0x30,0x03,0x5e,0xc5,0xcb,0x84,0x28,0xeb,0x70,0x89,0x62};
    sm9_fp_from_bytes(a, a22);
    sm9_fp_from_bytes(b, b22);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c22, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a23[32] = {0x5a,0xf8,0x9a,0x11,0x6c,0x9f,0xdd,0x68,0xc1,0xb6,0x5f,0xb7,0x6a,0x17,0xef,0xbf,0x22,0x71,0x6d,0x1e,0xcf,0x95,0x23,0xba,0xaa,0xac,0x38,0xcf,0x8c,0x01,0x83,0x1a};
    static std::uint8_t b23[32] = {0x16,0x91,0x6c,0x40,0x00,0xc7,0xfb,0x11,0xac,0xab,0xd7,0x2c,0x1e,0xf9,0xfb,0xe1,0xee,0x5f,0xc1,0x0b,0xa8,0xb3,0xda,0xe4,0x39,0x71,0xf4,0x67,0x7c,0xce,0x94,0x82};
    static std::uint8_t c23[32] = {0x44,0x67,0x2d,0xd1,0x6b,0xd7,0xe2,0x57,0x15,0x0a,0x88,0x8b,0x4b,0x1d,0xf3,0xdd,0x34,0x11,0xac,0x13,0x26,0xe1,0x48,0xd6,0x71,0x3a,0x44,0x68,0x0f,0x32,0xee,0x98};
    sm9_fp_from_bytes(a, a23);
    sm9_fp_from_bytes(b, b23);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c23, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a24[32] = {0x17,0x4c,0x29,0x5c,0x72,0xb7,0x85,0x2f,0xbe,0x46,0xc0,0xc5,0x2e,0x68,0x28,0xfe,0xb4,0x25,0xc7,0x8b,0x7d,0xa6,0x72,0xe0,0x7a,0x30,0xb3,0xe6,0xe0,0xc8,0x90,0x20};
    static std::uint8_t b24[32] = {0x43,0x19,0xf9,0xd6,0x32,0x3f,0xe3,0xcf,0x04,0xca,0xdb,0xb0,0x66,0xe3,0x16,0x38,0xf0,0x79,0x20,0x9a,0xff,0xdb,0xa0,0x49,0x03,0x04,0x41,0xa5,0x03,0xe2,0xb7,0x4f};
    static std::uint8_t c24[32] = {0x8a,0x72,0x2f,0x86,0x43,0x1b,0x48,0x52,0x8f,0x7f,0x90,0x64,0xbd,0x13,0xda,0x0a,0xe5,0x9f,0x3a,0x3b,0x98,0x45,0xc1,0x73,0x5c,0x9c,0x0d,0x69,0xc0,0x37,0x1e,0x4e};
    sm9_fp_from_bytes(a, a24);
    sm9_fp_from_bytes(b, b24);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c24, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a25[32] = {0x1c,0x2b,0xe4,0x41,0x79,0x44,0xe8,0xd1,0xa6,0xe4,0xc2,0x10,0x3a,0x77,0x1d,0x90,0x5c,0x0d,0x16,0xf0,0x6e,0x89,0x30,0xaa,0x8f,0x0a,0x77,0x5b,0x65,0x44,0x20,0x4b};
    static std::uint8_t b25[32] = {0x02,0x4b,0xab,0xee,0xf0,0xc6,0x21,0x4a,0xbc,0x98,0xe5,0x27,0x01,0xa9,0xb5,0x4f,0x96,0x7d,0x20,0xb5,0x98,0xec,0x5d,0x7e,0x19,0x44,0x2b,0x30,0xa1,0x53,0x7d,0x2b};
    static std::uint8_t c25[32] = {0x19,0xe0,0x38,0x52,0x88,0x7e,0xc7,0x86,0xea,0x4b,0xdc,0xe9,0x38,0xcd,0x68,0x40,0xc5,0x8f,0xf6,0x3a,0xd5,0x9c,0xd3,0x2c,0x75,0xc6,0x4c,0x2a,0xc3,0xf0,0xa3,0x20};
    sm9_fp_from_bytes(a, a25);
    sm9_fp_from_bytes(b, b25);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c25, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a26[32] = {0x73,0x51,0x51,0x6b,0x2b,0x43,0x78,0xca,0x2e,0xa8,0x58,0x72,0x7b,0x72,0xa2,0xc0,0x8a,0x3a,0xf6,0x6c,0x4e,0x2f,0xd1,0x25,0x41,0x9c,0x4f,0x81,0xda,0xce,0x66,0x19};
    static std::uint8_t b26[32] = {0x31,0x59,0x2d,0xb4,0x0c,0x47,0xb2,0x38,0x0b,0x79,0xe7,0xfc,0x51,0xca,0xd7,0xeb,0xf4,0x7b,0xac,0xb9,0xaa,0x1d,0x6c,0x29,0xf9,0x14,0x1a,0xfb,0x69,0x11,0x7f,0xba};
    static std::uint8_t c26[32] = {0x41,0xf8,0x23,0xb7,0x1e,0xfb,0xc6,0x92,0x23,0x2e,0x70,0x76,0x29,0xa7,0xca,0xd4,0x95,0xbf,0x49,0xb2,0xa4,0x12,0x64,0xfb,0x48,0x88,0x34,0x86,0x71,0xbc,0xe6,0x5f};
    sm9_fp_from_bytes(a, a26);
    sm9_fp_from_bytes(b, b26);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c26, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a27[32] = {0x70,0x8b,0x2e,0xa1,0x32,0xb3,0xf6,0xc7,0x7d,0xe8,0x28,0x88,0x74,0xec,0xce,0x74,0xd1,0x91,0x05,0x21,0xd2,0x1f,0xb2,0xc9,0xe9,0x11,0x13,0x0f,0x22,0x9c,0xfd,0x7a};
    static std::uint8_t b27[32] = {0x33,0xb7,0x3e,0x54,0x92,0xfb,0x8a,0x50,0x5e,0x92,0x11,0x2b,0x45,0x25,0x5f,0x4d,0x17,0xae,0x56,0x18,0x98,0xb7,0xc6,0xe4,0xff,0x7d,0x86,0x4f,0x0d,0xfe,0xf2,0x55};
    static std::uint8_t c27[32] = {0x3c,0xd3,0xf0,0x4c,0x9f,0xb8,0x6c,0x77,0x1f,0x56,0x17,0x5d,0x2f,0xc7,0x6f,0x27,0xb9,0xe2,0xaf,0x09,0x39,0x67,0xeb,0xe4,0xe9,0x93,0x8c,0xc0,0x14,0x9e,0x0b,0x25};
    sm9_fp_from_bytes(a, a27);
    sm9_fp_from_bytes(b, b27);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c27, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a28[32] = {0xb2,0x11,0x46,0x6b,0xea,0xe6,0x78,0x79,0x37,0x63,0xf2,0x25,0xaa,0x23,0x3c,0xfa,0xd4,0xf4,0xf8,0x59,0x9d,0x54,0x89,0xac,0xef,0x37,0xfb,0x89,0x49,0x90,0x59,0xb9};
    static std::uint8_t b28[32] = {0x77,0xc4,0x79,0xfc,0x92,0x8b,0x86,0xec,0xfb,0xe3,0xe2,0x13,0x1c,0xb1,0x42,0x9a,0x1d,0x55,0x45,0x5a,0xfa,0xad,0x0e,0x86,0xb0,0x7c,0x73,0xb4,0xdd,0x2e,0x9a,0x36};
    static std::uint8_t c28[32] = {0x3a,0x4c,0xcc,0x6f,0x58,0x5a,0xf1,0x8c,0x3b,0x80,0x10,0x12,0x8d,0x71,0xfa,0x60,0xb7,0x9f,0xb2,0xfe,0xa2,0xa7,0x7b,0x26,0x3e,0xbb,0x87,0xd4,0x6c,0x61,0xbf,0x83};
    sm9_fp_from_bytes(a, a28);
    sm9_fp_from_bytes(b, b28);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c28, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a29[32] = {0x32,0xe8,0xd1,0x09,0x00,0x94,0x5d,0xf5,0x1f,0xf8,0xc2,0x21,0xb5,0xa1,0x87,0x8a,0x82,0x75,0x1e,0xdd,0x2a,0xbd,0x09,0x33,0xc0,0x9b,0x1e,0x9a,0x66,0x10,0xab,0x77};
    static std::uint8_t b29[32] = {0x78,0xfb,0xc7,0x7c,0x1a,0x2b,0xe6,0xb7,0xf9,0x4e,0x19,0xb1,0x8c,0xf2,0x7a,0x99,0x94,0xee,0x96,0xfc,0x73,0x74,0x23,0x6b,0xa0,0xf0,0x34,0xea,0x93,0x6b,0x63,0xb9};
    static std::uint8_t c29[32] = {0x70,0x2d,0x09,0x8c,0xe9,0x0c,0x1e,0x2e,0xfc,0xae,0x53,0xc0,0x1e,0x3d,0xd4,0x36,0x0f,0x79,0x1b,0x2b,0xd1,0xc3,0xd4,0xa4,0x05,0x1a,0x84,0xd7,0xb5,0xf6,0x8d,0x3b};
    sm9_fp_from_bytes(a, a29);
    sm9_fp_from_bytes(b, b29);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c29, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a30[32] = {0x03,0x60,0x14,0x6c,0xcc,0xf6,0xb3,0x47,0x2f,0x7a,0x4b,0x73,0x1f,0xe8,0x1e,0x6d,0x15,0x83,0x68,0x00,0x4f,0x36,0x9c,0x0f,0xeb,0x40,0xbf,0xb4,0xf8,0x09,0x3c,0xcf};
    static std::uint8_t b30[32] = {0x87,0xcd,0x1a,0xc2,0x25,0x8d,0x27,0x09,0x8e,0x71,0xf7,0x1e,0x85,0x58,0x2c,0xee,0x67,0xdd,0xde,0x82,0xfb,0x4e,0xb6,0x92,0x08,0x4f,0xc3,0xaa,0xf4,0x83,0x44,0xbc};
    static std::uint8_t c30[32] = {0x31,0xd2,0xf9,0xaa,0xaa,0x0d,0x33,0x2f,0x77,0x0b,0xff,0xa4,0x90,0x1e,0xb8,0xc3,0xcf,0x98,0x1c,0xc8,0x6e,0x62,0xd4,0x59,0xc8,0x60,0x97,0x31,0xe6,0xd7,0x3d,0x90};
    sm9_fp_from_bytes(a, a30);
    sm9_fp_from_bytes(b, b30);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c30, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a31[32] = {0x30,0xbf,0x52,0xd1,0xad,0x90,0x8f,0x5f,0x1b,0x29,0xd3,0x02,0x29,0x55,0xff,0x18,0xcf,0x5c,0x96,0x16,0xa9,0x89,0x49,0x99,0xe3,0x7e,0xb3,0x40,0x57,0xc1,0xd5,0xac};
    static std::uint8_t b31[32] = {0x25,0x86,0x6f,0xf3,0x6b,0x16,0x82,0xf3,0x33,0xee,0x4b,0xb3,0xe6,0x8f,0x69,0x92,0x4f,0x77,0x5a,0xca,0x5d,0x92,0x04,0x16,0x1a,0x97,0xca,0xd2,0x52,0x45,0xc7,0x04};
    static std::uint8_t c31[32] = {0x0b,0x38,0xe2,0xde,0x42,0x7a,0x0c,0x6b,0xe7,0x3b,0x87,0x4e,0x42,0xc6,0x95,0x86,0x7f,0xe5,0x3b,0x4c,0x4b,0xf7,0x45,0x83,0xc8,0xe6,0xe8,0x6e,0x05,0x7c,0x0e,0xa8};
    sm9_fp_from_bytes(a, a31);
    sm9_fp_from_bytes(b, b31);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c31, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a32[32] = {0x32,0x36,0x78,0xd5,0x4e,0x83,0x84,0x0b,0x14,0xc6,0x9d,0x9e,0x55,0x39,0x82,0xcc,0x71,0x1a,0xd5,0x2a,0xc5,0xeb,0x88,0x2b,0xa5,0x75,0x78,0x57,0x83,0x9e,0x95,0xe9};
    static std::uint8_t b32[32] = {0x41,0x73,0x02,0xe0,0x6a,0x42,0x0e,0xf8,0x00,0x5a,0x86,0x8d,0xd4,0xfb,0x80,0x88,0x2d,0x23,0xce,0xa3,0x3b,0x40,0x3d,0xd3,0x42,0x62,0x8f,0x9a,0x79,0xfb,0xc9,0x67};
    static std::uint8_t c32[32] = {0xa7,0x03,0x75,0xf4,0xe6,0xe5,0x1c,0x04,0xea,0x6f,0xc2,0x60,0x75,0xcc,0xc9,0x89,0x65,0xe9,0x99,0xd2,0xa5,0x26,0x39,0x34,0x48,0x82,0x83,0xe4,0xec,0xf4,0x11,0xff};
    sm9_fp_from_bytes(a, a32);
    sm9_fp_from_bytes(b, b32);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c32, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a33[32] = {0x46,0x8c,0x1b,0x37,0x45,0x5e,0x9c,0xbf,0x74,0x83,0xe2,0xcf,0xae,0x9a,0xe0,0x99,0x1c,0x48,0xd4,0x26,0x8f,0x8b,0x7f,0x8c,0xea,0xb4,0x64,0x0a,0x1f,0xe4,0xe6,0xc1};
    static std::uint8_t b33[32] = {0x16,0x13,0xdc,0x94,0x75,0x16,0x0e,0xbb,0xf3,0xc0,0xfe,0x7f,0xb7,0xc7,0x33,0x1d,0x64,0xd6,0x29,0xbe,0xa4,0x1b,0x93,0xe1,0xdc,0x3a,0x25,0xc6,0x1e,0xe9,0x37,0xd0};
    static std::uint8_t c33[32] = {0x30,0x78,0x3e,0xa2,0xd0,0x48,0x8e,0x03,0x80,0xc2,0xe4,0x4f,0xf6,0xd3,0xad,0x7b,0xb7,0x72,0xaa,0x67,0xeb,0x6f,0xeb,0xab,0x0e,0x7a,0x3e,0x44,0x00,0xfb,0xae,0xf1};
    sm9_fp_from_bytes(a, a33);
    sm9_fp_from_bytes(b, b33);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c33, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a34[32] = {0x0a,0x16,0xbf,0xbb,0x07,0xea,0xb3,0x1a,0x56,0x32,0x39,0xa6,0x1f,0x29,0x4f,0x76,0x0e,0x51,0xdc,0xde,0x73,0xd2,0xe6,0x21,0x9c,0xce,0x57,0x9b,0x84,0x76,0x5a,0x74};
    static std::uint8_t b34[32] = {0x17,0x57,0x15,0xa5,0xfe,0x16,0x64,0x16,0xeb,0x32,0x85,0x34,0xe3,0x8b,0x5b,0xab,0x9b,0xc3,0x23,0x57,0x6b,0x1b,0x18,0xed,0xe8,0x3a,0x3d,0x89,0x74,0xa6,0x02,0xac};
    static std::uint8_t c34[32] = {0xa8,0xff,0xaa,0x15,0x0c,0x77,0xf5,0xf5,0x41,0x03,0x5f,0xc1,0x31,0x2c,0xbb,0x0f,0x94,0x81,0x4c,0xd2,0x23,0x32,0xbc,0x0f,0x9a,0x03,0xb5,0x39,0xf3,0x21,0x9d,0x45};
    sm9_fp_from_bytes(a, a34);
    sm9_fp_from_bytes(b, b34);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c34, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a35[32] = {0x45,0xdb,0xbb,0x58,0xe2,0xae,0x8a,0xca,0xae,0x7a,0x89,0x34,0xe8,0xc4,0x22,0x9b,0x53,0xcd,0x76,0xe7,0xa4,0xe5,0xe3,0xc4,0xf1,0x78,0x2a,0x88,0xfd,0xa3,0x65,0xa6};
    static std::uint8_t b35[32] = {0x18,0xa2,0x2d,0x70,0x93,0x5d,0x2c,0x7c,0x01,0x70,0xbd,0x6d,0xea,0x8b,0xd1,0x59,0x59,0xd3,0x90,0x4b,0xc8,0x11,0xc8,0x1c,0x4d,0x7a,0x1a,0x21,0x3f,0x42,0xec,0xe6};
    static std::uint8_t c35[32] = {0x2d,0x39,0x8d,0xe8,0x4f,0x51,0x5e,0x4e,0xad,0x09,0xcb,0xc6,0xfe,0x38,0x51,0x41,0xf9,0xf9,0xe6,0x9b,0xdc,0xd4,0x1b,0xa8,0xa3,0xfe,0x10,0x67,0xbe,0x60,0x78,0xc0};
    sm9_fp_from_bytes(a, a35);
    sm9_fp_from_bytes(b, b35);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c35, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a36[32] = {0x47,0xda,0x87,0x02,0x9b,0x39,0x6c,0x15,0x1b,0x11,0x7b,0xc3,0xed,0x6a,0xda,0xf4,0x6c,0xcf,0x28,0xc8,0xcd,0x2e,0xe9,0xbc,0x4e,0x8a,0xf9,0xff,0xe8,0x71,0x54,0x7a};
    static std::uint8_t b36[32] = {0x8b,0x68,0x71,0x0b,0x86,0x90,0x57,0x9c,0x45,0x19,0xbe,0xe3,0x71,0x22,0x3c,0xcd,0x9b,0x28,0x88,0xdd,0xfd,0xb4,0xf3,0x59,0x2f,0x8e,0xd3,0x5f,0x76,0x73,0x97,0x2b};
    static std::uint8_t c36[32] = {0x72,0xb2,0x15,0xf7,0x17,0x4c,0xbb,0x6a,0xab,0xfb,0x68,0x30,0x71,0xd7,0x65,0x6b,0xf3,0x99,0x33,0x35,0xe9,0xf4,0xe5,0x3f,0x04,0x6b,0xc1,0xc8,0x55,0x4f,0x02,0xcc};
    sm9_fp_from_bytes(a, a36);
    sm9_fp_from_bytes(b, b36);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c36, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a37[32] = {0x01,0xd0,0xd3,0x76,0x24,0x12,0x8d,0xe6,0xc9,0xea,0x44,0xc4,0xa9,0x6d,0xd4,0x20,0x84,0xdc,0x0f,0x22,0x31,0x3d,0x87,0x26,0xb5,0x46,0x01,0xf3,0x45,0x1c,0xda,0x85};
    static std::uint8_t b37[32] = {0x2b,0x24,0xb9,0xbc,0xbc,0x13,0xf0,0x11,0xea,0x61,0x33,0x06,0x13,0x68,0xc4,0x83,0xa7,0x48,0x79,0x32,0xc6,0x8c,0x6e,0x44,0xde,0x81,0xfd,0x9f,0x58,0xc1,0x36,0x13};
    static std::uint8_t c37[32] = {0x8c,0xec,0x19,0xb9,0x6a,0xa2,0x44,0xc6,0xb5,0x8c,0xbd,0x0e,0x8b,0x93,0xd6,0xe1,0xff,0x86,0x29,0x3a,0x85,0x2c,0x07,0xbd,0xbc,0x33,0x9f,0x7b,0xcf,0xac,0xe9,0xef};
    sm9_fp_from_bytes(a, a37);
    sm9_fp_from_bytes(b, b37);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c37, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a38[32] = {0x22,0xda,0x64,0x9e,0x7e,0xea,0x43,0x88,0x3a,0xc3,0x40,0x2e,0x70,0x1d,0xcb,0xc2,0xb8,0x61,0xd4,0x56,0x94,0xfb,0xea,0x80,0x07,0x76,0xe2,0xd5,0x5a,0xfd,0x22,0xc6};
    static std::uint8_t b38[32] = {0x49,0x82,0xd7,0x33,0x3c,0x52,0x7c,0x5b,0xb3,0xe9,0x80,0x4c,0xf2,0xb3,0xf7,0x9b,0x9f,0xb2,0x55,0x58,0xd6,0x8f,0x45,0x18,0x12,0x64,0x84,0x8b,0xa7,0x47,0x97,0xac};
    static std::uint8_t c38[32] = {0x8f,0x97,0x8d,0x6b,0x45,0x3b,0x6e,0x1e,0x5c,0xdd,0x6b,0x31,0x72,0xf8,0x9b,0x6c,0x3a,0xa2,0x12,0x48,0xd8,0xe7,0x94,0x43,0xda,0x81,0xf9,0x71,0x97,0x06,0xd0,0x97};
    sm9_fp_from_bytes(a, a38);
    sm9_fp_from_bytes(b, b38);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c38, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a39[32] = {0x94,0x6a,0xd2,0x64,0x8b,0x1e,0x6d,0xaa,0x7e,0xea,0xb5,0xd3,0x05,0x85,0xb0,0x02,0x39,0x23,0x2b,0xd1,0x19,0xf8,0xf5,0x9b,0xcb,0xde,0x77,0xc9,0x80,0xea,0x17,0x8d};
    static std::uint8_t b39[32] = {0x44,0x5e,0x03,0x14,0x1c,0x7a,0xe0,0xa9,0x11,0x29,0xfb,0x20,0x81,0xb8,0x6d,0x34,0xc0,0x19,0x3a,0x96,0x39,0x5c,0xbe,0x51,0x1f,0x29,0x93,0x87,0x16,0x5b,0x7c,0xe2};
    static std::uint8_t c39[32] = {0x50,0x0c,0xcf,0x50,0x6e,0xa3,0x8d,0x01,0x6d,0xc0,0xba,0xb2,0x83,0xcd,0x42,0xcd,0x79,0x09,0xf1,0x3a,0xe0,0x9c,0x37,0x4a,0xac,0xb4,0xe4,0x42,0x6a,0x8e,0x9a,0xab};
    sm9_fp_from_bytes(a, a39);
    sm9_fp_from_bytes(b, b39);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c39, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a40[32] = {0x09,0x74,0xbb,0xb9,0xeb,0xbd,0xbf,0x14,0x09,0x89,0x27,0xb9,0x1e,0x68,0xc5,0x48,0x8f,0xb6,0x1e,0x6d,0x40,0x9c,0xb5,0x16,0xca,0x71,0xdf,0x1e,0x28,0x3d,0x1e,0x5d};
    static std::uint8_t b40[32] = {0x2f,0x6a,0xa9,0x4f,0x83,0xb9,0x61,0x10,0x16,0x4f,0x7b,0x4f,0xaf,0xbf,0xab,0x5d,0x71,0x96,0x0b,0xfa,0xd4,0xad,0xbd,0x2d,0x0a,0xb1,0x3a,0x3d,0x5b,0xce,0xd9,0x84};
    static std::uint8_t c40[32] = {0x90,0x4a,0x12,0x6a,0x6a,0xa8,0x04,0xf5,0xc9,0x3d,0x57,0xb9,0x64,0x37,0xe1,0x30,0x40,0x12,0xa5,0xbd,0x86,0x69,0xe6,0xc5,0xa5,0x30,0x40,0x08,0xaf,0xbf,0x8a,0x56};
    sm9_fp_from_bytes(a, a40);
    sm9_fp_from_bytes(b, b40);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c40, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a41[32] = {0x2c,0x4f,0x64,0xcd,0x2f,0x70,0xee,0xde,0xe2,0x57,0x92,0x4e,0x5c,0xba,0xed,0x7a,0xee,0xcf,0x74,0x27,0xf1,0x50,0xad,0x1c,0x77,0x1d,0x7d,0x91,0xa6,0xf1,0x52,0xe0};
    static std::uint8_t b41[32] = {0x26,0x88,0xd7,0xf9,0x44,0x0f,0xf7,0xe0,0x53,0x14,0x4b,0x20,0x1a,0xcd,0xc0,0x25,0x9e,0xde,0x4f,0xe3,0xad,0x62,0xc7,0x41,0xad,0xcd,0xa9,0x70,0x13,0x68,0x8a,0x5d};
    static std::uint8_t c41[32] = {0x05,0xc6,0x8c,0xd3,0xeb,0x60,0xf6,0xfe,0x8f,0x43,0x47,0x2e,0x41,0xed,0x2d,0x55,0x4f,0xf1,0x24,0x44,0x43,0xed,0xe5,0xda,0xc9,0x4f,0xd4,0x21,0x93,0x88,0xc8,0x83};
    sm9_fp_from_bytes(a, a41);
    sm9_fp_from_bytes(b, b41);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c41, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a42[32] = {0x89,0xda,0xa8,0x06,0x5a,0x2a,0x2f,0x79,0xda,0xc6,0x6c,0x35,0x19,0xc3,0xfc,0x71,0xae,0xe3,0x5f,0x3a,0xbe,0xa5,0x3c,0x3d,0x9f,0xcf,0x7f,0xcd,0x91,0xba,0xb2,0xd5};
    static std::uint8_t b42[32] = {0x7d,0x6b,0x15,0xd8,0xdc,0xcb,0x0f,0xf8,0x9d,0x1e,0x1b,0x2c,0x49,0x6e,0x42,0x08,0xfc,0xc7,0xf0,0x66,0xcc,0xc7,0xe4,0xdd,0x7a,0x16,0xa9,0x06,0x46,0x2e,0xc7,0xe8};
    static std::uint8_t c42[32] = {0x0c,0x6f,0x92,0x2d,0x7d,0x5f,0x1f,0x81,0x3d,0xa8,0x51,0x08,0xd0,0x55,0xba,0x68,0xb2,0x1b,0x6e,0xd3,0xf1,0xdd,0x57,0x60,0x25,0xb8,0xd6,0xc7,0x4b,0x8b,0xea,0xed};
    sm9_fp_from_bytes(a, a42);
    sm9_fp_from_bytes(b, b42);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c42, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a43[32] = {0x6f,0xbb,0x9f,0xb1,0x2a,0x10,0x62,0xd4,0x20,0xa2,0x6c,0x9c,0x49,0x71,0x7c,0xcb,0x0b,0x52,0x98,0x09,0x4c,0x1b,0xfe,0xb1,0xdc,0x78,0xed,0xc6,0x72,0x7c,0x1f,0xb3};
    static std::uint8_t b43[32] = {0x27,0x45,0xfc,0xb6,0xf2,0x5f,0x40,0xdf,0xcb,0x3c,0x85,0x9a,0xae,0x1c,0x55,0xa1,0x4c,0xf7,0x6e,0x58,0xbe,0x42,0x5f,0x48,0xf8,0x29,0x99,0xe0,0x67,0xbd,0x51,0x56};
    static std::uint8_t c43[32] = {0x48,0x75,0xa2,0xfa,0x37,0xb1,0x21,0xf4,0x55,0x65,0xe7,0x01,0x9b,0x55,0x27,0x29,0xbe,0x5b,0x29,0xb0,0x8d,0xd9,0x9f,0x68,0xe4,0x4f,0x53,0xe6,0x0a,0xbe,0xce,0x5d};
    sm9_fp_from_bytes(a, a43);
    sm9_fp_from_bytes(b, b43);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c43, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a44[32] = {0x84,0x1d,0x8e,0x0d,0x74,0x1e,0xc8,0xe6,0xbe,0x47,0xe3,0x59,0x31,0x07,0x56,0xc9,0xe6,0x78,0xc0,0x23,0x28,0x30,0x8c,0x40,0x14,0x06,0xec,0xbb,0xcf,0x3b,0xe9,0x4b};
    static std::uint8_t b44[32] = {0x2b,0x29,0x5b,0xe6,0xba,0x0f,0xaf,0x00,0x95,0x79,0x52,0x3d,0xe7,0x20,0x19,0x34,0x36,0xf6,0x46,0xbe,0xbd,0xe8,0x71,0x6c,0x67,0xd1,0x90,0x63,0x59,0x9a,0x2d,0x05};
    static std::uint8_t c44[32] = {0x58,0xf4,0x32,0x26,0xba,0x0f,0x19,0xe6,0x28,0xce,0x91,0x1b,0x49,0xe7,0x3d,0x95,0xaf,0x82,0x79,0x64,0x6a,0x48,0x1a,0xd3,0xac,0x35,0x5c,0x58,0x75,0xa1,0xbc,0x46};
    sm9_fp_from_bytes(a, a44);
    sm9_fp_from_bytes(b, b44);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c44, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a45[32] = {0xa9,0x10,0x2d,0x71,0x1c,0xfc,0x7d,0x25,0x92,0xd5,0xc5,0x91,0xc0,0xa4,0xbf,0x2a,0x8d,0x91,0x0e,0x8e,0x60,0x6c,0xa6,0xd2,0xf4,0xac,0xbc,0xf9,0x20,0xd3,0xfb,0x07};
    static std::uint8_t b45[32] = {0xa9,0xff,0x1a,0x38,0x61,0x2e,0xe3,0x62,0x7e,0x4b,0xe1,0x17,0x30,0xfa,0x72,0x37,0xfa,0x90,0x5f,0x0d,0xf8,0xbc,0x0a,0xa5,0x60,0x7e,0x3a,0x13,0x20,0x44,0x5a,0x0e};
    static std::uint8_t c45[32] = {0xb5,0x51,0x13,0x38,0xbe,0x71,0x40,0xb4,0xea,0x8d,0x8f,0xca,0x85,0x39,0x14,0x37,0xb4,0xf3,0x42,0xcb,0x82,0x2b,0x8b,0x09,0x79,0x9e,0x1e,0x0d,0xe3,0xe0,0xe6,0x76};
    sm9_fp_from_bytes(a, a45);
    sm9_fp_from_bytes(b, b45);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c45, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a46[32] = {0x69,0xeb,0x50,0xee,0xb2,0xdf,0x56,0x82,0xa0,0xd5,0xe5,0x24,0xdd,0x55,0x7f,0x93,0xad,0xd0,0x94,0xf0,0xc5,0x92,0x2b,0x7a,0x7a,0x95,0x4c,0x97,0x0c,0x35,0x77,0x1d};
    static std::uint8_t b46[32] = {0x1f,0x71,0xcf,0x79,0x7c,0x96,0x80,0x74,0xf3,0x3b,0x28,0xbc,0xdd,0xa4,0xb9,0xcb,0x4e,0x76,0xd4,0xd0,0x2a,0xa5,0x94,0xfe,0x1a,0xa4,0xf6,0x0e,0xf2,0x5b,0xa5,0x27};
    static std::uint8_t c46[32] = {0x4a,0x79,0x81,0x75,0x36,0x48,0xd6,0x0d,0xad,0x9a,0xbc,0x67,0xff,0xb0,0xc5,0xc8,0x5f,0x59,0xc0,0x20,0x9a,0xec,0x96,0x7c,0x5f,0xf0,0x56,0x88,0x19,0xd9,0xd1,0xf6};
    sm9_fp_from_bytes(a, a46);
    sm9_fp_from_bytes(b, b46);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c46, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a47[32] = {0x08,0xae,0x13,0xde,0xad,0x08,0x38,0x67,0x89,0xcd,0x12,0x59,0xbd,0x6c,0x53,0x54,0xfe,0xb6,0xa4,0xe2,0x18,0xfa,0x3b,0xc3,0x58,0x96,0xa8,0x7e,0xbe,0x00,0x32,0x0a};
    static std::uint8_t b47[32] = {0x80,0xef,0xc8,0x4e,0x0a,0xca,0xef,0x0f,0x64,0x4a,0xe8,0xce,0x86,0x90,0xd3,0x2b,0x83,0x52,0x4d,0xfc,0x1f,0x96,0xdc,0x8d,0xac,0xd0,0x03,0x68,0xc0,0xca,0x2e,0xb0};
    static std::uint8_t c47[32] = {0x3d,0xfe,0x4b,0x90,0xa4,0xe0,0xf0,0x49,0xfb,0x85,0xd4,0xdb,0x2c,0x6a,0x47,0x6e,0x9d,0x56,0xea,0x31,0x13,0xde,0x4e,0x11,0x91,0x36,0x40,0x3d,0xe0,0x87,0x48,0xd7};
    sm9_fp_from_bytes(a, a47);
    sm9_fp_from_bytes(b, b47);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c47, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a48[32] = {0x55,0xe4,0x71,0x4d,0x38,0x5b,0x3c,0x14,0xf7,0x1a,0x71,0x12,0xd0,0x8c,0xe7,0x75,0x17,0x55,0xfd,0x40,0x17,0x4f,0xc7,0x01,0x14,0x3f,0xcb,0xfa,0xd0,0x3a,0x51,0xf1};
    static std::uint8_t b48[32] = {0x9d,0x3b,0x26,0xca,0x40,0xe7,0xb3,0x92,0x0d,0x97,0x78,0xfe,0x5d,0x53,0x43,0x22,0xa7,0xc8,0xec,0x55,0x7d,0x7f,0xad,0x3b,0x98,0xb7,0xaa,0xd3,0xc6,0x28,0x59,0xb3};
    static std::uint8_t c48[32] = {0x6e,0xe9,0x4a,0x82,0xfa,0x17,0x2f,0x74,0xbf,0x86,0xa3,0x64,0x68,0xc8,0x6b,0x97,0x91,0x7f,0xa4,0x35,0xb4,0x4b,0x08,0xa1,0x60,0xf7,0xbc,0x4e,0xed,0x63,0x3d,0xbb};
    sm9_fp_from_bytes(a, a48);
    sm9_fp_from_bytes(b, b48);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c48, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a49[32] = {0x21,0xc7,0xed,0xfb,0x9d,0xc6,0x5d,0x4b,0x6f,0xd7,0x85,0xae,0x18,0xd8,0x30,0xeb,0x76,0xf0,0xaa,0x41,0xf1,0x6a,0x4e,0xec,0x20,0xb2,0x8d,0x68,0x74,0x94,0xaf,0x77};
    static std::uint8_t b49[32] = {0x24,0x16,0xd6,0xfb,0xbd,0x34,0x20,0x60,0x78,0xf0,0xe7,0x6e,0x6f,0x3a,0xce,0x8e,0x01,0x7e,0x2b,0xd1,0x6c,0x5e,0x7d,0x3d,0x49,0x46,0x5e,0x8c,0x30,0x1d,0xd9,0xb2};
    static std::uint8_t c49[32] = {0xb3,0xf1,0x16,0xff,0xe3,0x35,0xe3,0xdc,0xcc,0xea,0x49,0x8f,0x9f,0x2c,0x29,0xa2,0x97,0x65,0x11,0xbb,0x9f,0x86,0xc0,0x8a,0xbc,0xdb,0xca,0x04,0x27,0xc8,0x1b,0x42};
    sm9_fp_from_bytes(a, a49);
    sm9_fp_from_bytes(b, b49);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c49, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a50[32] = {0x82,0x49,0x10,0xb9,0xda,0x27,0xe4,0x2c,0xc4,0xfd,0xc9,0x71,0xfe,0x89,0xa3,0x38,0xfe,0x43,0x77,0x11,0xc5,0xdd,0xd1,0xdf,0xc1,0x19,0x5d,0xc3,0x5e,0x10,0x21,0xd4};
    static std::uint8_t b50[32] = {0x52,0x23,0x0f,0x06,0xfa,0x49,0x2d,0xf9,0x4f,0x5f,0xa0,0x4d,0xc2,0x19,0xf0,0xa0,0xa9,0xd6,0x1f,0x22,0x02,0x81,0x05,0xb7,0x10,0x55,0x37,0xa4,0x27,0x1b,0xbb,0xa8};
    static std::uint8_t c50[32] = {0x30,0x26,0x01,0xb2,0xdf,0xde,0xb6,0x33,0x75,0x9e,0x29,0x24,0x3c,0x6f,0xb2,0x98,0x54,0x6d,0x57,0xef,0xc3,0x5c,0xcc,0x28,0xb0,0xc4,0x26,0x1f,0x36,0xf4,0x66,0x2c};
    sm9_fp_from_bytes(a, a50);
    sm9_fp_from_bytes(b, b50);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c50, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a51[32] = {0xac,0x2d,0xe0,0x78,0xe1,0x52,0x93,0x22,0xf3,0x53,0xc1,0xfa,0x80,0x28,0xba,0x35,0xda,0xa9,0x5b,0x62,0x3e,0xff,0xc4,0xf6,0x97,0x6e,0xb3,0x27,0x29,0x9a,0xa2,0x23};
    static std::uint8_t b51[32] = {0x1e,0x4a,0xc6,0x35,0x8a,0x88,0x05,0xba,0x6d,0x7d,0xb9,0x47,0x1d,0x8a,0x83,0x8f,0xda,0x80,0x7e,0xe9,0x80,0xdf,0xad,0x8a,0xf1,0x85,0xc2,0x6b,0x7e,0x0d,0xeb,0x97};
    static std::uint8_t c51[32] = {0x8d,0xe3,0x1a,0x43,0x56,0xca,0x8d,0x68,0x85,0xd6,0x08,0xb3,0x62,0x9e,0x36,0xa6,0x00,0x28,0xdc,0x78,0xbe,0x20,0x17,0x6b,0xa5,0xe8,0xf0,0xbb,0xab,0x8c,0xb6,0x8c};
    sm9_fp_from_bytes(a, a51);
    sm9_fp_from_bytes(b, b51);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c51, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a52[32] = {0x45,0xd9,0xbd,0x31,0x80,0x7a,0x07,0x01,0x23,0xc6,0xcf,0x9c,0xfb,0x4f,0x78,0x5f,0xde,0xfb,0x57,0x13,0x66,0xcf,0xc7,0xa1,0x45,0x05,0xb7,0xe5,0x5a,0xed,0xc8,0x27};
    static std::uint8_t b52[32] = {0xa3,0x6b,0x92,0x3d,0xf3,0xfd,0x39,0xc5,0x1a,0xd6,0xa8,0x5d,0x02,0x64,0x56,0x10,0x6d,0x16,0x3e,0x0b,0x4c,0x1e,0xdf,0xe4,0xa5,0xb2,0xbb,0x3e,0x78,0xaf,0x31,0x4d};
    static std::uint8_t c52[32] = {0x58,0xae,0x2a,0xf3,0x8f,0x20,0x74,0x2d,0xde,0xf3,0xd2,0x8f,0xee,0x79,0xe9,0x94,0x93,0xd7,0xac,0x53,0x35,0x2b,0xd6,0x98,0x84,0xc2,0x97,0xce,0xc5,0x8f,0xdc,0x57};
    sm9_fp_from_bytes(a, a52);
    sm9_fp_from_bytes(b, b52);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c52, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a53[32] = {0x5e,0xf5,0x38,0x08,0xbe,0x87,0xf4,0x0c,0x96,0x76,0x2e,0x89,0x91,0x2a,0xc8,0x9c,0xd7,0x3d,0xfe,0x54,0x31,0x83,0x19,0xd3,0x59,0x15,0x9f,0x66,0xa5,0x80,0x53,0xe4};
    static std::uint8_t b53[32] = {0x2b,0x6c,0xfa,0x0b,0xd2,0x2d,0x1d,0x98,0x93,0xe8,0xce,0xab,0xfd,0xf7,0xbc,0xed,0x1d,0xd4,0xfb,0xc8,0x8d,0x63,0x1c,0xce,0x58,0x98,0xd6,0x9e,0x23,0x70,0x68,0x76};
    static std::uint8_t c53[32] = {0x33,0x88,0x3d,0xfc,0xec,0x5a,0xd6,0x74,0x02,0x8d,0x5f,0xdd,0x93,0x33,0x0b,0xaf,0xb9,0x69,0x02,0x8b,0xa4,0x1f,0xfd,0x05,0x00,0x7c,0xc8,0xc8,0x82,0x0f,0xeb,0x6e};
    sm9_fp_from_bytes(a, a53);
    sm9_fp_from_bytes(b, b53);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c53, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a54[32] = {0x04,0x14,0xa4,0xef,0x63,0x9a,0xdc,0xc4,0x61,0x3d,0x91,0x08,0x28,0xfe,0x84,0x53,0x4e,0x9b,0x02,0x98,0x6e,0xd2,0x3d,0x00,0x03,0xd8,0x5b,0x9d,0xb9,0x1e,0x93,0x82};
    static std::uint8_t b54[32] = {0x16,0x03,0xa6,0x04,0x95,0x90,0xc0,0xd1,0x93,0xfd,0x0c,0x69,0xe5,0x6e,0x1b,0x1f,0x5f,0x8f,0x84,0x2c,0x92,0x3b,0xf3,0x07,0x40,0x41,0xa0,0x70,0xa8,0x1b,0xdb,0x8c};
    static std::uint8_t c54[32] = {0xa4,0x50,0xfe,0xea,0xd0,0xad,0xc2,0xe4,0xa3,0x44,0x2f,0xee,0x39,0x1f,0x30,0x79,0x10,0xfe,0x11,0xb6,0xf7,0x11,0x38,0xd4,0xa9,0x06,0x56,0x54,0xf4,0x53,0xfd,0x73};
    sm9_fp_from_bytes(a, a54);
    sm9_fp_from_bytes(b, b54);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c54, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a55[32] = {0x55,0x8b,0x04,0x0a,0x19,0xb8,0x7e,0x8c,0x06,0x80,0xe1,0x92,0x2f,0xa9,0x53,0x43,0x64,0x1e,0xe1,0x5d,0x0b,0xc8,0xa5,0xb4,0x00,0x83,0x23,0x2b,0x6d,0x82,0xc6,0x6e};
    static std::uint8_t b55[32] = {0x2f,0x29,0xf5,0xa7,0x3f,0x30,0x5b,0x0e,0xbe,0x6a,0x3e,0x4e,0xbb,0xa2,0x5e,0x29,0x60,0x0b,0x8a,0x6f,0xaa,0xa1,0xd9,0x12,0x42,0x82,0xd6,0xb3,0xc9,0x2c,0xb8,0x56};
    static std::uint8_t c55[32] = {0x26,0x61,0x0e,0x62,0xda,0x88,0x23,0x7d,0x48,0x16,0xa3,0x43,0x74,0x06,0xf5,0x1a,0x04,0x13,0x56,0xed,0x61,0x26,0xcc,0xa1,0xbe,0x00,0x4c,0x77,0xa4,0x56,0x0e,0x18};
    sm9_fp_from_bytes(a, a55);
    sm9_fp_from_bytes(b, b55);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c55, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a56[32] = {0x2c,0x74,0x54,0x07,0x36,0x95,0xe6,0xa0,0x4b,0x16,0x8b,0x00,0xdc,0x2c,0x6d,0xee,0x93,0x27,0x3a,0xd8,0xd5,0xd1,0x12,0x68,0x36,0xde,0xf8,0x17,0xb3,0x1a,0x48,0x9e};
    static std::uint8_t b56[32] = {0x36,0x2f,0xf4,0xe2,0xf5,0xc9,0x3d,0xfa,0xd4,0xf6,0x9f,0x47,0xfb,0x97,0xeb,0x24,0x80,0x4d,0xa3,0x99,0x28,0x1d,0xfa,0xf2,0x9b,0x43,0x85,0xf0,0x23,0x15,0xf1,0x8d};
    static std::uint8_t c56[32] = {0xac,0x84,0x5f,0x24,0x43,0x70,0x4f,0x97,0x4c,0x23,0x97,0x08,0xd6,0x23,0x4a,0x0f,0x34,0xcc,0x2a,0x8a,0xc8,0x2e,0x06,0x51,0x81,0x0b,0x0d,0x4f,0x73,0x55,0x9c,0x8e};
    sm9_fp_from_bytes(a, a56);
    sm9_fp_from_bytes(b, b56);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c56, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a57[32] = {0x4a,0x15,0x72,0x68,0xac,0x75,0x0c,0x2c,0xe1,0x06,0xdc,0x55,0xb9,0x45,0x0c,0x9a,0x6f,0x81,0x84,0x44,0xbc,0x1f,0x18,0x45,0xea,0x71,0xed,0x9e,0xf5,0xce,0xdc,0xf5};
    static std::uint8_t b57[32] = {0x12,0xaa,0x15,0xaa,0x79,0x2d,0x59,0xcb,0xfd,0x15,0xbe,0x55,0x10,0x9b,0x6a,0x06,0xcb,0xb1,0x38,0x67,0xc5,0x06,0x2c,0xf4,0x9d,0x46,0x15,0x7a,0x2d,0x90,0x05,0x98};
    static std::uint8_t c57[32] = {0x37,0x6b,0x5c,0xbe,0x33,0x47,0xb2,0x60,0xe3,0xf1,0x1e,0x00,0xa8,0xa9,0xa2,0x93,0xa3,0xd0,0x4b,0xdc,0xf7,0x18,0xeb,0x51,0x4d,0x2b,0xd8,0x24,0xc8,0x3e,0xd7,0x5d};
    sm9_fp_from_bytes(a, a57);
    sm9_fp_from_bytes(b, b57);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c57, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a58[32] = {0x5c,0x52,0xcf,0x5a,0x27,0x31,0xd9,0xe4,0x28,0xb6,0x39,0xf2,0x3a,0x35,0xa0,0x4b,0x84,0x9f,0x0c,0x28,0xca,0xe1,0xac,0x06,0x9b,0xe1,0xbd,0x7e,0x36,0x0e,0xb7,0x1c};
    static std::uint8_t b58[32] = {0xa5,0x56,0xf9,0x6d,0x0d,0xcc,0xf4,0xc9,0x97,0x42,0x3e,0xa4,0x60,0x4e,0xcd,0xf3,0x3e,0x41,0x3e,0x12,0x5d,0x90,0xd1,0x85,0x24,0x93,0xe5,0x0b,0xe3,0xca,0x60,0xc2};
    static std::uint8_t c58[32] = {0x6d,0x3b,0xd5,0xed,0x1c,0x08,0x8c,0x0c,0x67,0x77,0xa6,0x9d,0xcf,0x75,0x99,0x9d,0x68,0x50,0x61,0x61,0x87,0xcb,0xc9,0x5d,0x5c,0xbd,0x73,0x9a,0x35,0x95,0x9b,0xd7};
    sm9_fp_from_bytes(a, a58);
    sm9_fp_from_bytes(b, b58);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c58, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a59[32] = {0x3a,0x1c,0x19,0xfa,0xf5,0xf6,0x6d,0xaf,0x1a,0x9e,0xc8,0x45,0x57,0xa7,0x8e,0x97,0x6f,0x84,0xcc,0x74,0x9a,0x07,0x5f,0xdd,0x0c,0x70,0x84,0x9f,0x2d,0x97,0x0f,0xaf};
    static std::uint8_t b59[32] = {0x2e,0x1b,0x97,0x09,0x97,0x07,0x86,0x43,0x81,0x6c,0x2c,0x18,0x5a,0x1f,0xa4,0x82,0xe0,0xb8,0x92,0x10,0x8f,0x83,0x0b,0xca,0xeb,0x4c,0x49,0x90,0x27,0xfa,0x86,0xa2};
    static std::uint8_t c59[32] = {0x0c,0x00,0x82,0xf1,0x5e,0xee,0xe7,0x6b,0x99,0x32,0x9c,0x2c,0xfd,0x87,0xea,0x14,0x8e,0xcc,0x3a,0x64,0x0a,0x84,0x54,0x12,0x21,0x24,0x3b,0x0f,0x05,0x9c,0x89,0x0d};
    sm9_fp_from_bytes(a, a59);
    sm9_fp_from_bytes(b, b59);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c59, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a60[32] = {0x10,0x37,0xe7,0xb9,0xaa,0x09,0x65,0x6a,0x35,0x8e,0x00,0x9e,0x30,0x93,0x95,0xff,0x24,0x4c,0x47,0xad,0x55,0x60,0x98,0xd0,0xe9,0xbb,0xf5,0xaf,0x74,0x8f,0x8f,0x22};
    static std::uint8_t b60[32] = {0xae,0xac,0x24,0x64,0xbb,0x0b,0x9a,0xde,0xd8,0xbd,0x1e,0xca,0xfc,0x1c,0x8d,0x1a,0xdd,0x7a,0x49,0xf3,0x8f,0xeb,0x14,0x0c,0x7a,0xe2,0xd7,0x1c,0xa0,0xb0,0x0a,0x9f};
    static std::uint8_t c60[32] = {0x17,0xcb,0xc3,0x54,0xf1,0xa1,0x71,0x7d,0x32,0xd4,0x8d,0x23,0x2a,0x05,0xd0,0x29,0x68,0xc4,0x91,0x04,0xdf,0xf0,0x73,0xa0,0x54,0x48,0xb9,0xba,0xb7,0x30,0xca,0x00};
    sm9_fp_from_bytes(a, a60);
    sm9_fp_from_bytes(b, b60);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c60, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a61[32] = {0x92,0x98,0x49,0x56,0x5c,0xb8,0xc8,0xae,0x4c,0x7e,0x74,0x06,0x7b,0x61,0x07,0xab,0x3e,0xfc,0xb2,0x37,0xbc,0xc8,0xcb,0x3e,0x41,0xc2,0x71,0x85,0x3e,0x44,0xed,0x29};
    static std::uint8_t b61[32] = {0x32,0xf4,0x87,0x8f,0x4b,0xc1,0x1c,0x5e,0x9f,0xb7,0x3e,0x66,0x95,0xd6,0xc4,0x4a,0xba,0xbe,0x1b,0xd3,0x35,0x1f,0xc4,0xa5,0x22,0x57,0xbf,0xa1,0x04,0xb1,0x32,0x37};
    static std::uint8_t c61[32] = {0x5f,0xa3,0xc1,0xc7,0x10,0xf7,0xac,0x4f,0xac,0xc7,0x35,0x9f,0xe5,0x8a,0x43,0x60,0x84,0x3e,0x96,0x64,0x87,0xa9,0x06,0x99,0x1f,0x6a,0xb1,0xe4,0x39,0x93,0xba,0xf2};
    sm9_fp_from_bytes(a, a61);
    sm9_fp_from_bytes(b, b61);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c61, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a62[32] = {0x5b,0x80,0x9a,0xa6,0x0c,0x9d,0x14,0x0b,0x02,0x47,0xfe,0x1d,0xda,0x12,0x41,0xda,0x80,0x4d,0x5d,0xbe,0xd8,0xde,0xbc,0x23,0x99,0xc7,0xf8,0x93,0x43,0x5c,0x15,0x0f};
    static std::uint8_t b62[32] = {0x28,0x8d,0x33,0x63,0x1c,0x38,0x78,0x9b,0x6d,0x41,0xa9,0xd8,0xc8,0xd9,0x26,0x34,0x26,0xa4,0x86,0x3c,0x7c,0x19,0xba,0x63,0xef,0x13,0xa3,0xee,0x37,0xaa,0x97,0x10};
    static std::uint8_t c62[32] = {0x32,0xf3,0x67,0x42,0xf0,0x64,0x9b,0x6f,0x95,0x06,0x54,0x45,0x11,0x39,0x1b,0xa6,0x59,0xa8,0xd7,0x82,0x5c,0xc5,0x01,0xbf,0xaa,0xb4,0x54,0xa5,0x0b,0xb1,0x7d,0xff};
    sm9_fp_from_bytes(a, a62);
    sm9_fp_from_bytes(b, b62);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c62, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a63[32] = {0x07,0x6b,0x19,0x55,0x05,0x1a,0xa4,0x65,0x1f,0x96,0x4d,0x11,0x15,0xa3,0xdb,0x6a,0xc5,0x15,0x31,0x98,0xb4,0x23,0x2f,0xe0,0x32,0xb6,0x11,0x31,0xdf,0xa8,0x3b,0x38};
    static std::uint8_t b63[32] = {0xa5,0x5e,0x8c,0x20,0xdc,0xa6,0xe3,0x48,0x70,0xab,0xab,0x65,0x06,0xb2,0x27,0x92,0x42,0x08,0x7a,0x14,0xcb,0x1c,0x63,0x36,0x02,0xe8,0x7a,0xaa,0xb5,0xaf,0x54,0xbd};
    static std::uint8_t c63[32] = {0x18,0x4c,0x8d,0x34,0x2b,0x17,0x68,0x0e,0x84,0xee,0x4c,0xfc,0x04,0x80,0x7b,0x1d,0xa4,0xff,0x4a,0xcf,0x03,0x81,0xbb,0x86,0x15,0x3d,0x31,0xaf,0x0d,0x4a,0x2b,0xf8};
    sm9_fp_from_bytes(a, a63);
    sm9_fp_from_bytes(b, b63);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c63, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a64[32] = {0x3e,0xc3,0xd4,0xa2,0x47,0xa9,0x1e,0xe8,0xf8,0x78,0x58,0x09,0x09,0x9b,0x57,0x0d,0x2d,0x75,0xc7,0xf1,0xd9,0xa9,0xda,0x39,0x6a,0xd6,0x46,0x43,0xc8,0x5b,0xe5,0x72};
    static std::uint8_t b64[32] = {0x7a,0x86,0xb7,0x5e,0x1e,0x47,0x77,0x12,0x2b,0xee,0xa6,0xfb,0xbb,0xed,0xec,0x2c,0xe5,0x7a,0x65,0xae,0x8a,0x28,0xe2,0x14,0x66,0x63,0xd6,0x2e,0xa4,0x41,0xce,0x38};
    static std::uint8_t c64[32] = {0x7a,0x7d,0x1d,0x44,0x2c,0x05,0x4e,0xc8,0xa2,0x8d,0x5c,0x5d,0x43,0x3c,0x32,0x25,0x69,0xed,0xf5,0x8e,0x69,0xfb,0xe7,0x00,0xe9,0xe2,0x0b,0x3d,0x07,0x6b,0x5c,0xb7};
    sm9_fp_from_bytes(a, a64);
    sm9_fp_from_bytes(b, b64);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c64, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a65[32] = {0x1c,0xa2,0x22,0x22,0x25,0xbc,0x00,0x7e,0xfb,0x6e,0xcf,0xfa,0x9f,0xe7,0x3b,0xfc,0xc3,0x0a,0x40,0xf3,0x62,0x4f,0xce,0xae,0xdd,0xb0,0xc1,0x32,0x3f,0x25,0xbd,0x17};
    static std::uint8_t b65[32] = {0x13,0x4c,0x11,0xd0,0x97,0x25,0x4b,0x06,0x16,0x9e,0x8d,0x55,0x50,0xac,0xe0,0xb7,0x11,0xc1,0xdf,0x3a,0x98,0xbd,0x63,0x75,0x61,0xb0,0x0f,0xf6,0x1d,0x19,0xcb,0x4d};
    static std::uint8_t c65[32] = {0x09,0x56,0x10,0x51,0x8e,0x96,0xb5,0x78,0xe4,0xd0,0x42,0xa5,0x4f,0x3a,0x5b,0x45,0xb1,0x48,0x61,0xb8,0xc9,0x92,0x6b,0x39,0x7c,0x00,0xb1,0x3c,0x22,0x0b,0xf1,0xca};
    sm9_fp_from_bytes(a, a65);
    sm9_fp_from_bytes(b, b65);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c65, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a66[32] = {0x76,0x21,0xd7,0xf8,0x5e,0x1a,0x32,0xad,0x94,0xa9,0x79,0xe3,0x2a,0x0f,0x93,0x7b,0xc6,0xa9,0x97,0x5c,0x61,0xee,0x54,0x44,0x50,0x20,0xc1,0xfc,0x95,0xdb,0x2e,0x97};
    static std::uint8_t b66[32] = {0x89,0xac,0x4a,0x65,0x50,0x70,0x81,0x77,0x01,0x4c,0xa7,0x74,0x4a,0x8e,0x7a,0xbb,0xf4,0x43,0x70,0xc2,0xdd,0x91,0xb2,0xe7,0x95,0xf8,0xce,0x4b,0x5d,0x9f,0xab,0x07};
    static std::uint8_t c66[32] = {0xa2,0xb5,0x8d,0x93,0x10,0x4d,0x58,0x28,0x69,0x60,0x7d,0xbe,0xd5,0x0f,0xe0,0x04,0xf4,0x58,0xb9,0xe4,0x9e,0xd7,0x90,0x38,0x9f,0x97,0x8e,0xd9,0x1b,0x8c,0xc9,0x0d};
    sm9_fp_from_bytes(a, a66);
    sm9_fp_from_bytes(b, b66);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c66, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a67[32] = {0x0a,0x84,0x9f,0x8f,0xc5,0xa7,0xef,0x70,0x8e,0x1a,0x45,0x4d,0x1e,0x76,0xdf,0x85,0xf3,0x22,0x1e,0xa8,0x52,0x29,0xdc,0x57,0x80,0x6d,0x76,0x18,0x75,0x09,0x73,0xb6};
    static std::uint8_t b67[32] = {0x0d,0x2a,0x21,0xe6,0x5e,0x34,0xdb,0xd9,0xc4,0xd7,0x52,0xcd,0xab,0x63,0x02,0xb2,0xb5,0x48,0x72,0x33,0x55,0x68,0x86,0xaa,0x3b,0x45,0x13,0xfb,0xdf,0xc9,0x57,0x27};
    static std::uint8_t c67[32] = {0xb3,0x9a,0x7d,0xa9,0x6a,0x16,0xba,0x88,0x9f,0x46,0x9d,0xcf,0x68,0xa2,0xa4,0x18,0x5f,0xcc,0x3f,0xc0,0x17,0x3c,0x44,0x89,0x2a,0x97,0xfd,0x44,0x78,0x91,0x62,0x0c};
    sm9_fp_from_bytes(a, a67);
    sm9_fp_from_bytes(b, b67);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c67, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a68[32] = {0x7d,0xf2,0x9d,0xac,0x16,0xe7,0xcb,0x25,0x4b,0xf7,0x4a,0xd8,0xda,0x8f,0xf9,0x29,0x5f,0x23,0x3c,0x68,0xa5,0x84,0x99,0x91,0xea,0xe4,0x8a,0x40,0xe8,0xd3,0x7f,0xa1};
    static std::uint8_t b68[32] = {0x9a,0x36,0xd1,0xbe,0x56,0x92,0xfb,0x73,0x7b,0x1a,0x5e,0xf8,0xd3,0x5e,0xe7,0xfe,0xeb,0xca,0x02,0xbc,0x4a,0x86,0x77,0xed,0x87,0xa7,0x62,0x20,0x89,0xea,0x52,0x5b};
    static std::uint8_t c68[32] = {0x99,0xfb,0xcb,0xed,0xc2,0xf8,0x76,0xa3,0xa6,0xe0,0x97,0x2f,0xfc,0xbf,0xd8,0x6f,0x95,0x4b,0xcc,0xf7,0x75,0x79,0x10,0x80,0x48,0xac,0xc3,0x48,0x42,0x3a,0x72,0xc3};
    sm9_fp_from_bytes(a, a68);
    sm9_fp_from_bytes(b, b68);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c68, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a69[32] = {0x31,0xb5,0x23,0x47,0x25,0x87,0xde,0x35,0xa7,0xb0,0x4e,0x7a,0x58,0xbf,0x43,0x0e,0x21,0x69,0xdc,0x7f,0x45,0xe8,0x4f,0x55,0xa1,0x2f,0x25,0x67,0x55,0x54,0x0a,0xbb};
    static std::uint8_t b69[32] = {0x7d,0x7d,0x61,0x96,0xf4,0x90,0x69,0x97,0xf2,0x2b,0x81,0x7e,0x14,0x6c,0x16,0x96,0xb7,0x9f,0x34,0xa1,0x0c,0x0d,0x78,0xaa,0x0b,0x5d,0xe6,0xa6,0x00,0xee,0xa9,0x78};
    static std::uint8_t c69[32] = {0x6a,0x77,0xc1,0xb0,0x33,0x9b,0x1b,0x8f,0x8b,0x88,0x78,0x4c,0x39,0xe1,0xf3,0xbc,0x8b,0xbd,0x3b,0x29,0x54,0x55,0xc5,0x87,0x7b,0x40,0xd9,0xe9,0x37,0xb6,0xa6,0xc0};
    sm9_fp_from_bytes(a, a69);
    sm9_fp_from_bytes(b, b69);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c69, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a70[32] = {0x7e,0xf2,0x09,0xb7,0xa6,0x61,0xe8,0xd6,0x88,0xeb,0x6a,0x62,0x86,0x39,0x9f,0x49,0xe8,0x7f,0x75,0x65,0xe9,0x9c,0xca,0x90,0x9e,0xaf,0x52,0x31,0xc0,0x8a,0xc8,0x09};
    static std::uint8_t b70[32] = {0x0c,0x85,0xac,0xec,0xa3,0x12,0x3b,0x01,0x87,0x52,0xb2,0x4b,0x05,0xf3,0x4c,0x77,0x3c,0x16,0x74,0x7b,0xb9,0x6d,0xc9,0x38,0x29,0xfa,0xb5,0x48,0xf4,0x42,0xa5,0x54};
    static std::uint8_t c70[32] = {0x72,0x6c,0x5c,0xcb,0x03,0x4f,0xad,0xd5,0x01,0x98,0xb8,0x17,0x80,0x46,0x52,0xd2,0xac,0x69,0x00,0xea,0x30,0x2f,0x01,0x58,0x74,0xb4,0x9c,0xe8,0xcc,0x48,0x22,0xb5};
    sm9_fp_from_bytes(a, a70);
    sm9_fp_from_bytes(b, b70);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c70, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a71[32] = {0x3d,0xe2,0x24,0xc2,0xad,0x23,0x6e,0xcc,0x95,0x31,0x41,0x13,0xfd,0x5b,0x79,0x71,0x90,0xfc,0x5e,0x56,0x2c,0x14,0x79,0x5b,0x3b,0x5e,0x09,0x9d,0x1e,0x11,0xfa,0xab};
    static std::uint8_t b71[32] = {0x35,0x62,0x59,0x1d,0x60,0x83,0xec,0xd3,0x9c,0x66,0xf7,0xd8,0x58,0xa1,0x49,0xb0,0x9a,0xda,0xc6,0xb5,0xac,0xf7,0x66,0x35,0x1c,0x57,0xb1,0x30,0x25,0x12,0xf5,0x8e};
    static std::uint8_t c71[32] = {0x08,0x7f,0xcb,0xa5,0x4c,0x9f,0x81,0xf8,0xf8,0xca,0x49,0x3b,0xa4,0xba,0x2f,0xc0,0xf6,0x21,0x97,0xa0,0x7f,0x1d,0x13,0x26,0x1f,0x06,0x58,0x6c,0xf8,0xff,0x05,0x1d};
    sm9_fp_from_bytes(a, a71);
    sm9_fp_from_bytes(b, b71);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c71, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a72[32] = {0xb4,0xd2,0xfd,0xad,0xd0,0x94,0x87,0xaf,0xfa,0x1c,0xdf,0x93,0x83,0x32,0x37,0x38,0x31,0x6d,0xe7,0xe1,0xda,0xec,0x2b,0xdd,0xbf,0x7f,0xb6,0xce,0xbc,0x04,0xa3,0x68};
    static std::uint8_t b72[32] = {0x95,0x30,0x3f,0xf7,0xcb,0x8b,0xb0,0xc6,0x35,0x3f,0x53,0x10,0x5a,0xa4,0x1d,0x35,0xa8,0x8b,0x80,0x58,0xbb,0x4f,0xda,0x72,0xb8,0x50,0xc7,0x45,0x02,0x58,0xbc,0x4a};
    static std::uint8_t c72[32] = {0x1f,0xa2,0xbd,0xb6,0x05,0x08,0xd6,0xe9,0xc4,0xdd,0x8c,0x83,0x28,0x8e,0x1a,0x02,0x88,0xe2,0x67,0x89,0x1f,0x9c,0x51,0x6b,0x07,0x2e,0xef,0x89,0xb9,0xab,0xe7,0x1e};
    sm9_fp_from_bytes(a, a72);
    sm9_fp_from_bytes(b, b72);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c72, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a73[32] = {0x1e,0x1c,0x8d,0x91,0xb9,0x21,0x2b,0x06,0x02,0x12,0xf9,0xf2,0x44,0xce,0xed,0x2f,0x2d,0xe0,0xe1,0x47,0x5c,0x7c,0xac,0xd9,0x78,0xfe,0x50,0xff,0x0c,0x1b,0xad,0x7e};
    static std::uint8_t b73[32] = {0x21,0x86,0xab,0xfc,0x9e,0x06,0xd1,0xdb,0xb9,0xbf,0xe0,0x1e,0x42,0xe4,0x88,0xbc,0x05,0x95,0xee,0x02,0x5e,0x39,0xc2,0xa2,0x99,0x58,0x86,0xde,0x5d,0x38,0x80,0xa6};
    static std::uint8_t c73[32] = {0xb2,0xd5,0xe1,0x95,0x1d,0xbe,0x00,0x1c,0x1e,0x56,0xc5,0x23,0xf7,0x79,0x2b,0xb8,0x4a,0x3d,0x86,0x90,0x18,0xbd,0xd9,0x12,0xc5,0x15,0x65,0x48,0x92,0x34,0x72,0x55};
    sm9_fp_from_bytes(a, a73);
    sm9_fp_from_bytes(b, b73);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c73, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a74[32] = {0x5a,0xc7,0x99,0x4d,0x2c,0x81,0xf8,0xae,0xff,0xf0,0x5a,0x09,0xbe,0x68,0xf4,0xf4,0xe1,0xb6,0xed,0xfb,0xe9,0x55,0xdf,0xf4,0x2b,0xd3,0x7d,0xbe,0xe6,0x9a,0x29,0xd4};
    static std::uint8_t b74[32] = {0x43,0x80,0x99,0x45,0xce,0xd7,0x28,0xad,0x19,0x2c,0x9c,0xc5,0x67,0x88,0x2b,0x01,0x86,0x72,0x8e,0x9e,0xed,0x64,0x1c,0x47,0x83,0x11,0xd9,0x5b,0x3c,0x1c,0x9b,0x91};
    static std::uint8_t c74[32] = {0x17,0x47,0x00,0x07,0x5d,0xaa,0xd0,0x01,0xe6,0xc3,0xbd,0x44,0x56,0xe0,0xc9,0xf3,0x5b,0x44,0x5f,0x5c,0xfb,0xf1,0xc3,0xac,0xa8,0xc1,0xa4,0x63,0xaa,0x7d,0x8e,0x43};
    sm9_fp_from_bytes(a, a74);
    sm9_fp_from_bytes(b, b74);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c74, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a75[32] = {0xa9,0x70,0x30,0x29,0xb4,0x25,0x12,0xa5,0xaf,0x59,0xc3,0xd3,0x37,0x38,0xfa,0x10,0x83,0xc8,0xac,0x8f,0xe7,0xe8,0xc6,0xd7,0xdb,0x67,0x5f,0x0a,0x46,0x0c,0x88,0xc0};
    static std::uint8_t b75[32] = {0x58,0xb0,0x5a,0x3c,0x6a,0x5e,0x5e,0xa7,0xa2,0x39,0x5a,0x7a,0x6d,0xdd,0x5f,0xdf,0xc4,0x2d,0x66,0x76,0x59,0x39,0xf3,0xa2,0x18,0x43,0xce,0x66,0xac,0x45,0x06,0x19};
    static std::uint8_t c75[32] = {0x50,0xbf,0xd5,0xed,0x49,0xc6,0xb3,0xfe,0x0d,0x20,0x69,0x58,0xc9,0x5b,0x9a,0x30,0xbf,0x9b,0x46,0x19,0x8e,0xae,0xd3,0x35,0xc3,0x23,0x90,0xa3,0x99,0xc7,0x82,0xa7};
    sm9_fp_from_bytes(a, a75);
    sm9_fp_from_bytes(b, b75);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c75, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a76[32] = {0x94,0x60,0x5f,0xea,0x70,0x26,0x26,0x0e,0xa9,0xe5,0x53,0x53,0x65,0x9b,0xb6,0x45,0x0c,0xc1,0x54,0x2d,0x5f,0x9a,0xaa,0xd5,0x5e,0x81,0x96,0x17,0xcf,0xbf,0xdf,0xd3};
    static std::uint8_t b76[32] = {0x2e,0xa5,0xcf,0x1b,0x2e,0x8c,0x63,0x1a,0x71,0x52,0xca,0xef,0x13,0x65,0x50,0x39,0xed,0x1e,0xa6,0x83,0xd6,0x02,0x55,0xaa,0xfc,0x6a,0x65,0xd8,0xb9,0x81,0x75,0xc9};
    static std::uint8_t c76[32] = {0x65,0xba,0x90,0xcf,0x41,0x99,0xc2,0xf4,0x38,0x92,0x88,0x64,0x52,0x36,0x66,0x0b,0x1f,0xa2,0xad,0xa9,0x89,0x98,0x55,0x2a,0x62,0x17,0x30,0x3f,0x16,0x3e,0x6a,0x0a};
    sm9_fp_from_bytes(a, a76);
    sm9_fp_from_bytes(b, b76);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c76, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a77[32] = {0x47,0x8e,0xe4,0x9a,0x41,0xef,0x46,0x8f,0x19,0x87,0x06,0x53,0x5f,0x84,0xc7,0xf3,0xd4,0x72,0x25,0x39,0x13,0xb0,0x73,0xe5,0x96,0xf0,0x0b,0xcc,0x1a,0x7a,0xba,0x0f};
    static std::uint8_t b77[32] = {0x8f,0xcb,0x72,0x6a,0xbe,0x23,0x83,0x1a,0xd6,0x3d,0x80,0x9b,0xb1,0xc3,0x46,0x15,0x9a,0x9b,0xa6,0x0f,0xfc,0xed,0x8a,0x04,0xef,0x24,0xcc,0x8a,0x13,0x34,0xf3,0x55};
    static std::uint8_t c77[32] = {0x6e,0x03,0x72,0x2f,0x86,0x6f,0x6a,0x66,0x19,0x4d,0x31,0x07,0xa3,0x50,0x49,0x23,0x5b,0xc9,0x12,0x74,0x31,0x3d,0xd8,0xbc,0x8d,0x3a,0xda,0x69,0xea,0x97,0x0c,0x37};
    sm9_fp_from_bytes(a, a77);
    sm9_fp_from_bytes(b, b77);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c77, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a78[32] = {0x6e,0x97,0xfd,0xbf,0xc3,0x0a,0xb8,0x31,0x67,0x14,0xbf,0xe6,0xcc,0x0b,0x1c,0xa1,0xbe,0xeb,0xd8,0x7e,0x1e,0xaf,0x57,0x80,0xfe,0x84,0x38,0x00,0x69,0x89,0x2d,0x39};
    static std::uint8_t b78[32] = {0x81,0x70,0xdf,0x0e,0x04,0x02,0x7a,0x2d,0xef,0x7b,0x58,0xfc,0xd7,0x76,0x3c,0xc1,0xd4,0x03,0xb0,0x47,0xc7,0xaf,0xba,0xb6,0x05,0xb7,0x03,0x2b,0x0c,0xbe,0x0a,0x57};
    static std::uint8_t c78[32] = {0xa3,0x67,0x1e,0xb1,0xc1,0xab,0xe4,0xf5,0x4d,0x9d,0x12,0x39,0xea,0x23,0xa7,0x25,0x0c,0xda,0xbb,0x81,0x71,0x7a,0x8b,0xa6,0xde,0x3c,0xcf,0xfd,0x40,0x1c,0x68,0x5f};
    sm9_fp_from_bytes(a, a78);
    sm9_fp_from_bytes(b, b78);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c78, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a79[32] = {0x1f,0x6b,0xd2,0xc8,0xfe,0x33,0x7f,0x11,0x6d,0x0b,0x3a,0xc4,0x57,0x80,0xfa,0x2c,0x35,0xc9,0x99,0x29,0xb0,0xff,0xed,0x56,0x96,0xa0,0xc0,0x77,0x7c,0x76,0x11,0x27};
    static std::uint8_t b79[32] = {0x38,0x36,0xf0,0xdd,0x8d,0xbd,0x79,0x2a,0x76,0x1f,0x5d,0xc1,0xb0,0xfe,0x75,0x24,0xf5,0x29,0x5e,0x95,0x37,0x3c,0x56,0x67,0x14,0xdf,0xe1,0x08,0x5a,0xcd,0xe4,0x5e};
    static std::uint8_t c79[32] = {0x9d,0x74,0xe1,0xeb,0x73,0x19,0xac,0xd8,0xcc,0xef,0x88,0x52,0x9c,0x11,0x4c,0x4c,0x62,0x92,0xcd,0xdf,0x94,0x3e,0x85,0xcb,0x67,0x30,0x7a,0x97,0x04,0xf9,0x72,0x46};
    sm9_fp_from_bytes(a, a79);
    sm9_fp_from_bytes(b, b79);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c79, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a80[32] = {0x24,0xb3,0x35,0x26,0x1f,0xeb,0x0c,0x4f,0x9c,0xe0,0x29,0x19,0x59,0xfe,0xbb,0xd0,0x29,0xea,0xf0,0x9a,0x93,0x21,0xc5,0x91,0x90,0x69,0xfe,0x59,0xf8,0xb6,0x51,0x1f};
    static std::uint8_t b80[32] = {0x60,0x9c,0x7b,0xed,0x6d,0x33,0x76,0x67,0xd9,0xb0,0x4e,0xad,0x49,0xc6,0x4b,0xd4,0x4a,0xe5,0xfa,0xfa,0x3f,0x17,0xea,0xae,0x93,0xfc,0x35,0xe2,0x6f,0xfa,0x42,0xa1};
    static std::uint8_t c80[32] = {0x7a,0x56,0xb9,0x38,0xb5,0x5b,0x3c,0xd9,0x99,0x33,0x85,0xbc,0x05,0xc7,0x37,0x41,0x00,0xf7,0x88,0xeb,0x6e,0x84,0xc9,0xbe,0xe1,0xdd,0x63,0x9f,0x6c,0x0d,0x53,0xfb};
    sm9_fp_from_bytes(a, a80);
    sm9_fp_from_bytes(b, b80);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c80, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a81[32] = {0x3f,0xde,0x5e,0x07,0xc1,0x0a,0xe7,0xf0,0x25,0x81,0x49,0xea,0x35,0x2f,0xf2,0x4b,0xbd,0xe0,0x5c,0xfe,0x6d,0x89,0x5d,0x99,0x79,0x02,0x30,0x2d,0xcd,0x53,0xa3,0x18};
    static std::uint8_t b81[32] = {0x2f,0x30,0x51,0xd5,0xc5,0x6c,0xe7,0xba,0xdb,0xd9,0xb4,0xc2,0xd7,0x98,0x51,0x04,0x17,0xce,0x0f,0xd0,0xe9,0x57,0xe1,0x60,0xb9,0xc8,0xc0,0xae,0x9b,0xd1,0xd2,0x8c};
    static std::uint8_t c81[32] = {0x10,0xae,0x0c,0x31,0xfb,0x9e,0x00,0x35,0x49,0xa7,0x95,0x27,0x5d,0x97,0xa1,0x47,0xa6,0x12,0x4d,0x2d,0x84,0x31,0x7c,0x38,0xbf,0x39,0x6f,0x7f,0x31,0x81,0xd0,0x8c};
    sm9_fp_from_bytes(a, a81);
    sm9_fp_from_bytes(b, b81);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c81, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a82[32] = {0x15,0x02,0xce,0xad,0x42,0x7f,0xd3,0xb8,0xac,0xcb,0x01,0x74,0x90,0xff,0x6b,0x82,0x66,0x61,0x71,0x13,0x11,0xe7,0x54,0x2f,0x58,0xa8,0xc9,0x69,0x6d,0x45,0x51,0xae};
    static std::uint8_t b82[32] = {0x41,0x60,0x37,0xe5,0xee,0x6e,0x4b,0xf9,0xcc,0xb4,0x17,0xa5,0xb7,0xa4,0x71,0x48,0x45,0x85,0xd8,0x61,0x56,0x31,0x09,0x0c,0x06,0xb0,0xc3,0x68,0x5e,0xa3,0xe0,0x48};
    static std::uint8_t c82[32] = {0x89,0xe2,0x96,0xc7,0x56,0xb5,0x2e,0xb0,0xb6,0x1a,0x95,0x1e,0xce,0xe9,0xc1,0x7f,0x42,0xce,0x2b,0xfc,0xd6,0x31,0x39,0xff,0x37,0x67,0xa1,0x28,0xf1,0xf2,0xb6,0xe3};
    sm9_fp_from_bytes(a, a82);
    sm9_fp_from_bytes(b, b82);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c82, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a83[32] = {0x19,0x7c,0x2e,0x81,0x27,0x02,0x61,0xec,0x80,0x86,0x9a,0x96,0x13,0xc4,0x22,0x2d,0x85,0x59,0x4f,0x53,0x4c,0x97,0x90,0x6a,0x10,0x55,0xdc,0x3d,0x5c,0xf9,0x33,0xfb};
    static std::uint8_t b83[32] = {0x9d,0x76,0xb9,0x18,0x9e,0x0e,0x81,0xd3,0x63,0x36,0x16,0x9f,0x15,0xe2,0x4b,0x42,0x54,0xdb,0xc1,0x91,0xff,0xe0,0xc5,0x8d,0x25,0xdf,0xa1,0x10,0xb7,0xfb,0x3a,0xea};
    static std::uint8_t c83[32] = {0x32,0x45,0x75,0x68,0x8b,0x97,0x87,0x0a,0xf3,0x54,0x2f,0x46,0xf3,0x70,0x9e,0x30,0x52,0x70,0x21,0x0c,0x67,0x31,0xb9,0xb8,0xcf,0xe5,0xd6,0x54,0x88,0x4f,0x3e,0x8e};
    sm9_fp_from_bytes(a, a83);
    sm9_fp_from_bytes(b, b83);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c83, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a84[32] = {0x26,0xba,0x98,0xca,0x2d,0xa4,0xdf,0x61,0xb6,0xb5,0x3e,0xd8,0x4c,0x3c,0x36,0xda,0xa1,0xe5,0xa7,0x24,0x75,0x14,0xbe,0xa5,0x6d,0x07,0x25,0xad,0x55,0xe4,0xa8,0xb4};
    static std::uint8_t b84[32] = {0x07,0xe1,0xb1,0xbd,0xba,0xd1,0x1f,0xc8,0xbf,0x9f,0x4f,0x69,0xac,0xb0,0xb3,0xa6,0x9e,0x9b,0xf9,0x71,0x1b,0xea,0xfb,0x23,0xa7,0xcf,0x77,0x06,0x97,0xb4,0x7e,0x04};
    static std::uint8_t c84[32] = {0x1e,0xd8,0xe7,0x0c,0x72,0xd3,0xbf,0x98,0xf7,0x15,0xef,0x6e,0x9f,0x8b,0x83,0x34,0x03,0x49,0xad,0xb3,0x59,0x29,0xc3,0x81,0xc5,0x37,0xae,0xa6,0xbe,0x30,0x2a,0xb0};
    sm9_fp_from_bytes(a, a84);
    sm9_fp_from_bytes(b, b84);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c84, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a85[32] = {0x83,0xa3,0x64,0xa7,0x02,0x71,0x7d,0xd2,0x30,0x08,0x3f,0x38,0x2b,0xe1,0x56,0x06,0x24,0xa4,0xbb,0x9e,0xa5,0x71,0x3f,0x54,0xe1,0xa4,0x52,0xd7,0x40,0x47,0xed,0x54};
    static std::uint8_t b85[32] = {0x19,0x00,0xfe,0x1e,0x56,0x53,0xa3,0xa8,0xc5,0x48,0x08,0xfe,0x1f,0x81,0x80,0x70,0xdc,0x1e,0x44,0x96,0x80,0xb9,0xfb,0x63,0x3c,0x2c,0x2a,0x32,0x17,0x01,0xd5,0x6b};
    static std::uint8_t c85[32] = {0x6a,0xa2,0x66,0x88,0xac,0x1d,0xda,0x29,0x6a,0xc0,0x36,0x3a,0x0c,0x5f,0xd5,0x95,0x48,0x86,0x77,0x08,0x24,0xb7,0x43,0xf1,0xa5,0x78,0x28,0xa5,0x29,0x46,0x17,0xe9};
    sm9_fp_from_bytes(a, a85);
    sm9_fp_from_bytes(b, b85);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c85, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a86[32] = {0x13,0x92,0xd7,0x7b,0x7c,0xa3,0x4b,0xff,0xf4,0xac,0xa4,0x85,0x4e,0x1d,0x4d,0xa0,0x84,0xd2,0xbc,0x3c,0x54,0xfc,0xef,0xaa,0x39,0x47,0xf6,0xf3,0x02,0xeb,0xdc,0x6c};
    static std::uint8_t b86[32] = {0x37,0x15,0xf6,0x83,0xd1,0xbd,0x16,0xca,0xe5,0xa7,0x95,0xf2,0x63,0x77,0xc2,0x1b,0x13,0x8e,0x24,0x3b,0x67,0xb9,0x91,0xff,0xcd,0x98,0xb4,0xb8,0x3f,0xae,0x2b,0x1b};
    static std::uint8_t c86[32] = {0x92,0xbc,0xe0,0xf7,0xad,0x89,0xdc,0x26,0xe5,0x08,0xb9,0xe2,0xe0,0x34,0x52,0xca,0x93,0x37,0x2b,0x4c,0x07,0xbe,0x4c,0x86,0x51,0x1e,0xdd,0x62,0xa6,0x8e,0xf6,0xce};
    sm9_fp_from_bytes(a, a86);
    sm9_fp_from_bytes(b, b86);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c86, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a87[32] = {0x38,0x20,0xfb,0x64,0x0b,0xf0,0xa9,0x51,0xd8,0x77,0x7a,0xa7,0xf0,0x43,0x23,0xbc,0xc8,0x22,0xed,0x9b,0xb2,0x8f,0x25,0x78,0x95,0x34,0x1f,0x63,0x2a,0xa6,0x62,0xaf};
    static std::uint8_t b87[32] = {0x12,0x35,0x02,0xcd,0x66,0xa4,0x8f,0x16,0xb2,0x56,0xc6,0x8d,0xc0,0x62,0xe0,0x06,0x73,0xb8,0xd9,0x9f,0xf1,0xb6,0x19,0xb0,0xec,0xa8,0x66,0x2e,0x34,0xdc,0x00,0xbe};
    static std::uint8_t c87[32] = {0x25,0xeb,0xf8,0x96,0xa5,0x4c,0x1a,0x3b,0x26,0x20,0xb4,0x1a,0x2f,0xe0,0x43,0xb6,0x54,0x6a,0x13,0xfb,0xc0,0xd9,0x0b,0xc7,0xa8,0x8b,0xb9,0x34,0xf5,0xca,0x61,0xf1};
    sm9_fp_from_bytes(a, a87);
    sm9_fp_from_bytes(b, b87);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c87, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a88[32] = {0x07,0x0f,0xbb,0xc7,0xb3,0xd9,0x42,0x49,0xde,0x4b,0x4e,0x91,0xaf,0x26,0x5a,0xec,0x1e,0x1e,0x8a,0xa2,0x1d,0xfb,0x6f,0x99,0x9b,0x4b,0x3e,0xe0,0xb3,0xe9,0x5a,0x74};
    static std::uint8_t b88[32] = {0x08,0xb4,0xdf,0xd7,0x99,0x9a,0xbf,0x0d,0x14,0xc4,0xf7,0x00,0xd1,0x20,0x48,0x72,0xea,0x09,0x5a,0x7a,0x85,0xef,0x9f,0x46,0x4a,0x13,0x7d,0x57,0xe2,0xf7,0x66,0x91};
    static std::uint8_t c88[32] = {0xb4,0x9a,0xdb,0xf0,0x1c,0xe2,0x2a,0x2e,0x9f,0x8a,0x02,0xe0,0xd3,0x94,0xd9,0xbe,0x56,0x07,0xc3,0x72,0xb2,0x86,0xbf,0x2f,0x36,0xa7,0x5c,0xb0,0xb4,0x43,0x39,0x60};
    sm9_fp_from_bytes(a, a88);
    sm9_fp_from_bytes(b, b88);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c88, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a89[32] = {0x22,0xc5,0xcf,0xa5,0x00,0xc9,0xc0,0x34,0x43,0x69,0x49,0x51,0xa0,0x69,0xb7,0x2b,0x95,0xa4,0x35,0xb6,0xfb,0xe9,0xc7,0xc7,0x52,0x87,0x25,0x9f,0x43,0x6f,0xd2,0xb5};
    static std::uint8_t b89[32] = {0x38,0xa9,0xa3,0xb6,0xf8,0x92,0xeb,0x73,0x3d,0xb2,0xe8,0x23,0x60,0xb2,0xff,0x7f,0x43,0xae,0xd3,0xc1,0xbb,0x71,0x94,0xc3,0x79,0xfa,0x11,0xba,0xdb,0xeb,0xbc,0xdd};
    static std::uint8_t c89[32] = {0xa0,0x5c,0x2b,0xee,0x0a,0xda,0x7b,0xb2,0xdb,0xba,0x0c,0x7e,0x35,0x45,0x7e,0xf1,0x73,0xe7,0xf5,0x40,0x5a,0xf3,0x21,0xdf,0xbd,0xfc,0xaf,0x0c,0x4a,0xd5,0x5b,0x55};
    sm9_fp_from_bytes(a, a89);
    sm9_fp_from_bytes(b, b89);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c89, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a90[32] = {0x4a,0xdb,0x83,0xe8,0x8b,0x25,0xf8,0x48,0x6b,0x9d,0x18,0x73,0xb9,0xb4,0x8c,0xf5,0x3a,0x7a,0x0d,0x01,0x17,0x64,0x28,0xad,0x51,0x50,0xd0,0xdc,0xaa,0x99,0xfb,0x19};
    static std::uint8_t b90[32] = {0x62,0xcf,0x33,0xe4,0x63,0xf1,0x77,0x99,0x66,0xe7,0xee,0xa5,0x89,0x8f,0xc1,0x2f,0x90,0x8b,0xd9,0xa0,0x97,0x0a,0x0a,0xd2,0xab,0xf8,0xf0,0xf6,0x6d,0xcc,0xa8,0x68};
    static std::uint8_t c90[32] = {0x9e,0x4c,0x50,0x04,0x29,0xd8,0x27,0xa0,0xda,0xb8,0xd5,0x1e,0x25,0xb3,0x93,0x0a,0xcb,0xe0,0xc6,0xab,0x9a,0xd5,0x0c,0xb6,0x8a,0xc7,0x7b,0x0e,0x20,0x1e,0x98,0x2e};
    sm9_fp_from_bytes(a, a90);
    sm9_fp_from_bytes(b, b90);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c90, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a91[32] = {0xa6,0x66,0xbd,0x24,0x0b,0x87,0x2c,0x15,0x78,0xe7,0xd6,0x6a,0x87,0x40,0xfc,0xfc,0xa4,0x4e,0x54,0xd5,0xce,0x57,0x9a,0xa6,0x27,0x47,0x0d,0xb4,0xf7,0xc5,0xc4,0x8e};
    static std::uint8_t b91[32] = {0x46,0x62,0x09,0x83,0x90,0x4e,0x35,0xf3,0x9a,0xe6,0xb1,0xba,0x0d,0x92,0xde,0xfb,0x2f,0x20,0x13,0x92,0x22,0x8e,0xe2,0xc9,0xa5,0xeb,0x84,0x27,0x7b,0x17,0x54,0x54};
    static std::uint8_t c91[32] = {0x60,0x04,0xb3,0xa0,0x7b,0x38,0xf6,0x21,0xde,0x01,0x24,0xb0,0x79,0xae,0x1e,0x01,0x75,0x2e,0x41,0x43,0xab,0xc8,0xb7,0xdc,0x81,0x5b,0x89,0x8d,0x7c,0xae,0x70,0x3a};
    sm9_fp_from_bytes(a, a91);
    sm9_fp_from_bytes(b, b91);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c91, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a92[32] = {0x07,0xa9,0x16,0x56,0x09,0xc8,0x01,0x8b,0x99,0xbc,0x0c,0x06,0x7b,0x55,0x2b,0xb4,0x89,0x60,0xee,0x75,0x4e,0xb4,0xf0,0xe1,0x71,0x95,0xc0,0xfe,0x49,0xe7,0x56,0xf6};
    static std::uint8_t b92[32] = {0x5a,0x96,0xcb,0xd4,0x16,0x32,0xff,0xa2,0xe8,0x23,0x34,0x81,0x11,0x1c,0xf7,0x45,0x45,0x0e,0x61,0xdd,0x2d,0x71,0x14,0xa4,0x0b,0x10,0x18,0x49,0x2f,0x3a,0x14,0x61};
    static std::uint8_t c92[32] = {0x63,0x52,0x4a,0x81,0xf6,0x38,0xa8,0xda,0x87,0x9c,0x82,0xd5,0x5f,0xc6,0xfb,0xb4,0x66,0x45,0x1f,0xe3,0x3b,0xbe,0xcb,0x19,0x4b,0xf5,0x43,0xdc,0xfd,0xfe,0x88,0x12};
    sm9_fp_from_bytes(a, a92);
    sm9_fp_from_bytes(b, b92);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c92, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a93[32] = {0x37,0xb6,0x6f,0x43,0x04,0x75,0xd2,0xd9,0x54,0xce,0xb8,0x51,0x3f,0x62,0xab,0x88,0xa9,0xeb,0xe2,0x1f,0xbe,0x3b,0x3e,0x5d,0xff,0xb5,0x0b,0x22,0x09,0x9b,0x47,0x65};
    static std::uint8_t b93[32] = {0x48,0xe5,0xbc,0x64,0xbe,0x5c,0x00,0xfd,0x40,0x31,0x03,0xe6,0x69,0x10,0x4e,0x0e,0x55,0xb3,0x81,0x05,0x83,0x95,0x93,0xe5,0x90,0x1b,0x54,0xc7,0x06,0x34,0x19,0xaa};
    static std::uint8_t c93[32] = {0xa5,0x10,0xb2,0xde,0x48,0xbd,0x78,0xcd,0xea,0xa1,0x5f,0xba,0xcb,0xe1,0x24,0xbf,0x76,0x2a,0xf4,0x65,0x55,0x20,0x99,0x54,0x55,0x09,0x51,0x82,0xe6,0xb8,0x73,0x38};
    sm9_fp_from_bytes(a, a93);
    sm9_fp_from_bytes(b, b93);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c93, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a94[32] = {0x34,0x40,0xdc,0x11,0x60,0xa8,0xb6,0x4b,0xfb,0xc4,0x2e,0x56,0xfb,0x11,0x58,0x12,0x04,0x93,0x84,0x7a,0xcc,0x6e,0x8e,0xcc,0x1f,0x53,0x06,0xf8,0x15,0x15,0xe7,0x31};
    static std::uint8_t b94[32] = {0xaa,0xf3,0x05,0xe6,0x3d,0x67,0x56,0x9c,0x29,0x70,0x32,0xc8,0x66,0xbb,0x94,0x11,0x03,0xaa,0x2d,0x30,0x78,0x3d,0x8e,0xbf,0x1b,0xba,0x55,0xd2,0xe6,0x96,0xc0,0xa5};
    static std::uint8_t c94[32] = {0x3f,0x8d,0xd6,0x2b,0x25,0xe5,0x06,0xa1,0xa8,0x57,0xa6,0xde,0x89,0xe4,0x8b,0x46,0x22,0xdb,0xea,0x95,0x6e,0xab,0xee,0xe8,0xe9,0x08,0x4c,0x4d,0x11,0xd0,0x6c,0x09};
    sm9_fp_from_bytes(a, a94);
    sm9_fp_from_bytes(b, b94);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c94, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a95[32] = {0x52,0xd6,0xd1,0xa8,0x87,0x99,0xe1,0xad,0x2d,0x44,0xe7,0x6e,0x42,0x54,0x57,0x60,0x68,0xe1,0xa1,0x16,0xf5,0xc1,0xf7,0xe0,0xc3,0x0a,0x1e,0xed,0xbe,0xa9,0x48,0x4e};
    static std::uint8_t b95[32] = {0x46,0x9d,0xbc,0x7e,0x4c,0x37,0x29,0x52,0xfd,0x55,0x45,0x2f,0x80,0xa7,0x29,0x2b,0xc3,0x33,0x25,0x4b,0x34,0x67,0x14,0x9a,0xee,0xb8,0x51,0x45,0x4e,0xc8,0xd9,0x86};
    static std::uint8_t c95[32] = {0x0c,0x39,0x15,0x2a,0x3b,0x62,0xb8,0x5a,0x2f,0xef,0xa2,0x3e,0xc1,0xad,0x2e,0x34,0xa5,0xae,0x7b,0xcb,0xc1,0x5a,0xe3,0x45,0xd4,0x51,0xcd,0xa8,0x6f,0xe0,0x6e,0xc8};
    sm9_fp_from_bytes(a, a95);
    sm9_fp_from_bytes(b, b95);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c95, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a96[32] = {0x71,0xc8,0xae,0xe0,0xa0,0xe5,0x85,0xe1,0xa8,0xc3,0xcb,0xf3,0xe2,0x37,0x03,0xe9,0xbb,0xdf,0xc7,0x6f,0x63,0x2d,0x40,0xa2,0x98,0x03,0x29,0x12,0x5d,0x4d,0x2c,0x54};
    static std::uint8_t b96[32] = {0x07,0xed,0x08,0x43,0x6b,0x0c,0x93,0xde,0x2f,0xc7,0x4b,0x75,0xed,0x53,0x40,0x29,0x12,0xfd,0x35,0x44,0x15,0xda,0xc1,0x44,0x79,0x86,0x2c,0x67,0xf0,0xd3,0xf0,0x72};
    static std::uint8_t c96[32] = {0x69,0xdb,0xa6,0x9d,0x35,0xd8,0xf2,0x03,0x78,0xfc,0x80,0x7d,0xf4,0xe3,0xc3,0xc0,0xa8,0xe2,0x92,0x2b,0x4d,0x52,0x7f,0x5e,0x1e,0x7c,0xfc,0xaa,0x6c,0x79,0x3b,0xe2};
    sm9_fp_from_bytes(a, a96);
    sm9_fp_from_bytes(b, b96);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c96, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a97[32] = {0x91,0x00,0x52,0xde,0x43,0x51,0x78,0x39,0xa6,0x51,0x5a,0x16,0x5f,0x23,0x2f,0xa4,0x61,0x7c,0xe6,0x98,0x9d,0xf5,0xd8,0x63,0xb8,0x2b,0x56,0xe6,0x7d,0x28,0x2a,0xf6};
    static std::uint8_t b97[32] = {0x3e,0x8f,0x80,0x55,0xfa,0x24,0xb3,0x2a,0xce,0x3e,0x01,0x84,0x2f,0xda,0xeb,0x84,0x89,0x4d,0x54,0x1a,0x8e,0xd9,0xdb,0x11,0x2e,0x25,0xbf,0x39,0xb2,0xde,0x38,0x7d};
    static std::uint8_t c97[32] = {0x52,0x70,0xd2,0x88,0x49,0x2c,0xc5,0x0e,0xd8,0x13,0x58,0x92,0x2f,0x48,0x44,0x1f,0xd8,0x2f,0x92,0x7e,0x0f,0x1b,0xfd,0x52,0x8a,0x05,0x97,0xac,0xca,0x49,0xf2,0x79};
    sm9_fp_from_bytes(a, a97);
    sm9_fp_from_bytes(b, b97);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c97, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a98[32] = {0x38,0x46,0x08,0x20,0xe3,0x69,0x4c,0x35,0xb5,0x07,0x87,0x46,0xc0,0xdc,0x63,0x95,0x7a,0x8f,0x52,0x9b,0x1a,0xa1,0xcf,0xd2,0x8b,0x69,0x80,0x07,0x71,0x86,0x97,0xff};
    static std::uint8_t b98[32] = {0x37,0x14,0x98,0x21,0x6d,0x7d,0xce,0x6e,0x18,0x5d,0x19,0x77,0x27,0xd1,0x74,0xe3,0x85,0xaf,0x44,0x64,0x3c,0x28,0xae,0xf6,0x6c,0x90,0x30,0x71,0x03,0x1d,0xbf,0x91};
    static std::uint8_t c98[32] = {0x01,0x31,0x6f,0xff,0x75,0xeb,0x7d,0xc7,0x9c,0xaa,0x6d,0xcf,0x99,0x0a,0xee,0xb1,0xf4,0xe0,0x0e,0x36,0xde,0x79,0x20,0xdc,0x1e,0xd9,0x4f,0x96,0x6e,0x68,0xd8,0x6e};
    sm9_fp_from_bytes(a, a98);
    sm9_fp_from_bytes(b, b98);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c98, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
    static std::uint8_t a99[32] = {0x14,0x39,0x52,0xbc,0xa3,0xc3,0x98,0x10,0x95,0x26,0x3b,0xc0,0xf1,0x49,0xf6,0x2c,0x94,0x79,0x7e,0x50,0x94,0xd9,0xf2,0xb4,0x88,0xba,0x43,0x89,0xc8,0x61,0x94,0x9a};
    static std::uint8_t b99[32] = {0x17,0xfc,0xa2,0x67,0x5d,0x4b,0x5b,0x81,0x01,0x2a,0x3b,0xe6,0x4e,0xd6,0xd9,0x80,0xc4,0xbc,0xe8,0x8a,0x7f,0x75,0x38,0x27,0x71,0xec,0xfd,0x5c,0xa5,0x17,0x39,0x9d};
    static std::uint8_t c99[32] = {0xb2,0x7c,0xb0,0x55,0x49,0x1b,0xe3,0x81,0x69,0xff,0xab,0x2a,0x98,0x01,0xe3,0xf0,0xf1,0xaf,0x29,0x11,0x2f,0xdf,0xa9,0x68,0xfc,0x3c,0xe1,0x55,0x06,0x9b,0xa0,0x7a};
    sm9_fp_from_bytes(a, a99);
    sm9_fp_from_bytes(b, b99);
    sm9_fp_sub(c, a, b);
    sm9_fp_to_bytes(c_data, c);
    if (std::memcmp(c99, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fp_sub");
    }
}